Pre-pull patch posting (fixes)
Hi,
Here is the latest set of GFS2 fixes. They are all fairly small,
Steve.
PATCH 1/4 GFS2: Fix refcnt leak on gfs2_follow_link() error path
From: OGAWA Hirofumi <[email protected]>
If ->follow_link handler return the error, it should decrement nd->path refcnt.
This patch fix it.
--- fs/gfs2/ops_inode.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
fs/gfs2/ops_inode.c +2 -1
@@ -1088,7 +1088,8 @@ static void *gfs2_follow_link(struct dentry *dentry, struct nameidata *nd) error =vfs_follow_link (nd, buf);if (buf != array)kfree (buf); - } + }else +path_put (&nd->path);return ERR_PTR (error); }
Signature · 1 line
1.6.2.5
PATCH 2/4 GFS2: Don't withdraw on partial rindex entries
From: Benjamin Marzinski <[email protected]>
ince gfs2 writes the rindex file a block at a time, and releases the exclusive lock after each block, it is possible that another process will grab the lock in the middle of the write. Since rindex entries are not an even divisor of blocks, that other process may see partial entries. On grows, this is fine. The process can simply ignore the the partial entires. Previously, the code withdrew when it saw partial entries. Now it simply ignores them.
--- fs/gfs2/rgrp.c | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-)
fs/gfs2/rgrp.c +0 -5
@@ -591,11 +591,6 @@ static int gfs2_ri_update(struct gfs2_inode *ip)u64 rgrp_count = ip->i_disksize;int error; -if (do_div (rgrp_count,sizeof (struct gfs2_rindex ))) { -gfs2_consist_inode (ip); -return -EIO ; - } -clear_rgrpdi (sdp);file_ra_state_init (&ra_state, inode->i_mapping);
Signature · 1 line
1.6.2.5
PATCH 3/4 GFS2: Fix previous patch
The do_div() call needs to remain.
--- fs/gfs2/rgrp.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
fs/gfs2/rgrp.c +1 -0
@@ -591,6 +591,7 @@ static int gfs2_ri_update(struct gfs2_inode *ip)u64 rgrp_count = ip->i_disksize;int error; +do_div (rgrp_count,sizeof (struct gfs2_rindex ));clear_rgrpdi (sdp);file_ra_state_init (&ra_state, inode->i_mapping);
Signature · 1 line
1.6.2.5
PATCH 4/4 GFS2: Use GFP_NOFS for alloc structure
This is called under a glock, so its a good plan to use GFP_NOFS
--- fs/gfs2/rgrp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
fs/gfs2/rgrp.c +1 -1
@@ -911,7 +911,7 @@ void gfs2_rgrp_repolish_clones(struct gfs2_rgrpd *rgd)struct gfs2_alloc *gfs2_alloc_get (struct gfs2_inode *ip) {BUG_ON (ip->i_alloc !=NULL ); - ip->i_alloc =kzalloc (sizeof (struct gfs2_alloc ),GFP_KERNEL ); + ip->i_alloc =kzalloc (sizeof (struct gfs2_alloc ),GFP_NOFS );return ip->i_alloc; }
Signature · 1 line
1.6.2.5