Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit acb57a36 authored by Bob Peterson's avatar Bob Peterson Committed by Steven Whitehouse
Browse files

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: default avatarBob Peterson <rpeterso@redhat.com>
Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
parent bd1eb881
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
}