summaryrefslogtreecommitdiffstats
path: root/fs/gfs2
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2010-06-24 19:15:09 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2010-07-15 09:05:17 +0100
commita8bf2bc212e129dd59a8b06cdbc15079cc3bd876 (patch)
treeb0a298e7f2534de52b9506fa1d6040e98e263a87 /fs/gfs2
parent2f7989efd4398d92b8adffce2e07dd043a0895fe (diff)
downloadop-kernel-dev-a8bf2bc212e129dd59a8b06cdbc15079cc3bd876.zip
op-kernel-dev-a8bf2bc212e129dd59a8b06cdbc15079cc3bd876.tar.gz
GFS2: O_TRUNC not working on stuffed files across cluster
This patch replaces a statement that got dropped out by accident. Without the patch, truncates on stuffed (very small) files cause those files to have an unpredictable size. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r--fs/gfs2/bmap.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
index 4a48c0f..84da64b 100644
--- a/fs/gfs2/bmap.c
+++ b/fs/gfs2/bmap.c
@@ -1041,6 +1041,7 @@ static int trunc_start(struct gfs2_inode *ip, u64 size)
if (gfs2_is_stuffed(ip)) {
u64 dsize = size + sizeof(struct gfs2_inode);
+ ip->i_disksize = size;
ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME;
gfs2_trans_add_bh(ip->i_gl, dibh, 1);
gfs2_dinode_out(ip, dibh->b_data);
OpenPOWER on IntegriCloud