git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git]
/
fs
/
direct-io.c
diff --git
a/fs/direct-io.c
b/fs/direct-io.c
index
d498521
..
37f593c
100644
(file)
--- a/
fs/direct-io.c
+++ b/
fs/direct-io.c
@@
-395,7
+395,7
@@
static int dio_bio_complete(struct dio *dio, struct bio *bio)
for (page_no = 0; page_no < bio->bi_vcnt; page_no++) {
struct page *page = bvec[page_no].bv_page;
for (page_no = 0; page_no < bio->bi_vcnt; page_no++) {
struct page *page = bvec[page_no].bv_page;
- if (dio->rw == READ)
+ if (dio->rw == READ
&& !PageCompound(page)
)
set_page_dirty_lock(page);
page_cache_release(page);
}
set_page_dirty_lock(page);
page_cache_release(page);
}
@@
-990,6
+990,13
@@
direct_io_worker(int rw, struct kiocb *iocb, struct inode *inode,
}
} /* end iovec loop */
}
} /* end iovec loop */
+ if (ret == -ENOTBLK && rw == WRITE) {
+ /*
+ * The remaining part of the request will be
+ * be handled by buffered I/O when we return
+ */
+ ret = 0;
+ }
/*
* There may be some unwritten disk at the end of a part-written
* fs-block-sized block. Go zero that now.
/*
* There may be some unwritten disk at the end of a part-written
* fs-block-sized block. Go zero that now.
@@
-1089,13
+1096,6
@@
direct_io_worker(int rw, struct kiocb *iocb, struct inode *inode,
aio_complete(iocb, ret, 0);
kfree(dio);
}
aio_complete(iocb, ret, 0);
kfree(dio);
}
- if (ret == -ENOTBLK && rw == WRITE) {
- /*
- * The entire request will be be handled by buffered I/O
- * when we return
- */
- ret = 0;
- }
return ret;
}
return ret;
}