From e764872c8c7184a3ccb2e57300ec29ffe8464443 Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Mon, 21 Nov 2011 10:01:25 +0000 Subject: [PATCH] --- yaml --- r: 280336 b: refs/heads/master c: 4442f2e03ed9646664c94e197e637b03324a6664 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/gfs2/file.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 5c062a2171f6..e47fe2436bb4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b9f417f311a7141d0ba67e5c8e535010d2712f2d +refs/heads/master: 4442f2e03ed9646664c94e197e637b03324a6664 diff --git a/trunk/fs/gfs2/file.c b/trunk/fs/gfs2/file.c index 6336bc6bf458..9b6c6ac351a8 100644 --- a/trunk/fs/gfs2/file.c +++ b/trunk/fs/gfs2/file.c @@ -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; @@ -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: