summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/ops_address.c
diff options
context:
space:
mode:
authorBob Peterson2008-09-11 21:35:37 +0200
committerSteven Whitehouse2008-09-15 11:31:54 +0200
commitacb57a3652c614efed26080dad5972c0076166b1 (patch)
treee459ed13f5a05eb6a2427015c60356e3afe85c55 /fs/gfs2/ops_address.c
parentGFS2: Use an IS_ERR test rather than a NULL test (diff)
downloadkernel-qcow2-linux-acb57a3652c614efed26080dad5972c0076166b1.tar.gz
kernel-qcow2-linux-acb57a3652c614efed26080dad5972c0076166b1.tar.xz
kernel-qcow2-linux-acb57a3652c614efed26080dad5972c0076166b1.zip
GFS2: Direct IO write at end of file error
This patch fixes a problem whereby a direct_io write doesn't fall back to buffered write properly at end of file. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/ops_address.c')
-rw-r--r--fs/gfs2/ops_address.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c
index e64a1b04117a..ae7126aeb447 100644
--- a/fs/gfs2/ops_address.c
+++ b/fs/gfs2/ops_address.c
@@ -975,7 +975,7 @@ static int gfs2_ok_for_dio(struct gfs2_inode *ip, int rw, loff_t offset)
if (gfs2_is_stuffed(ip))
return 0;
- if (offset > i_size_read(&ip->i_inode))
+ if (offset >= i_size_read(&ip->i_inode))
return 0;
return 1;
}