Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 280336
b: refs/heads/master
c: 4442f2e
h: refs/heads/master
v: v3
  • Loading branch information
Steven Whitehouse committed Nov 21, 2011
1 parent 2ccedd3 commit e764872
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b9f417f311a7141d0ba67e5c8e535010d2712f2d
refs/heads/master: 4442f2e03ed9646664c94e197e637b03324a6664
5 changes: 5 additions & 0 deletions trunk/fs/gfs2/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,8 @@ static long gfs2_fallocate(struct file *file, int mode, loff_t offset,
loff_t bytes, max_bytes;
struct gfs2_alloc *al;
int error;
const loff_t pos = offset;
const loff_t count = len;
loff_t bsize_mask = ~((loff_t)sdp->sd_sb.sb_bsize - 1);
loff_t next = (offset + len - 1) >> sdp->sd_sb.sb_bsize_shift;
loff_t max_chunk_size = UINT_MAX & bsize_mask;
Expand Down Expand Up @@ -834,6 +836,9 @@ static long gfs2_fallocate(struct file *file, int mode, loff_t offset,
gfs2_quota_unlock(ip);
gfs2_alloc_put(ip);
}

if (error == 0)
error = generic_write_sync(file, pos, count);
goto out_unlock;

out_trans_fail:
Expand Down

0 comments on commit e764872

Please sign in to comment.