Skip to content

Commit

Permalink
GFS2: Direct IO write at end of file error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bob Peterson authored and Steven Whitehouse committed Sep 15, 2008
1 parent bd1eb88 commit acb57a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/gfs2/ops_address.c
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit acb57a3

Please sign in to comment.