mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-11-20 08:38:24 +08:00
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>
This commit is contained in:
parent
bd1eb8818c
commit
acb57a3652
@ -975,7 +975,7 @@ static int gfs2_ok_for_dio(struct gfs2_inode *ip, int rw, loff_t offset)
|
|||||||
if (gfs2_is_stuffed(ip))
|
if (gfs2_is_stuffed(ip))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (offset > i_size_read(&ip->i_inode))
|
if (offset >= i_size_read(&ip->i_inode))
|
||||||
return 0;
|
return 0;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user