author: Omar Sandoval <osandov@osandov.com> 2015-03-16 04:33:52 -0700
committer: Al Viro <viro@zeniv.linux.org.uk> 2015-04-11 22:29:45 -0400
commit: 6f67376318abea58589ebe6d69dffeabb6f6c26a
parent: a95cd6311512bd954e88684eb39373f7f4b0a984
Commit Summary:
Diffstat:
1 file changed, 1 insertion, 1 deletion
diff --git a/fs/jfs/inode.c b/fs/jfs/inode.c
index c20f7883543f..e7047b63ffc5 100644
--- a/fs/jfs/inode.c
+++ b/fs/jfs/inode.c
@@ -345,7 +345,7 @@ static ssize_t jfs_direct_IO(int rw, struct kiocb *iocb,
* In case of error extending write may have instantiated a few
* blocks outside i_size. Trim these off again.
*/
- if (unlikely((rw & WRITE) && ret < 0)) {
+ if (unlikely(iov_iter_rw(iter) == WRITE && ret < 0)) {
loff_t isize = i_size_read(inode);
loff_t end = offset + count;