summaryrefslogtreecommitdiffstats
path: root/fs/jfs
diff options
context:
space:
mode:
authorBill Pemberton <wfp5p@virginia.edu>2010-04-16 08:01:20 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-12 15:02:50 -0700
commit3af5615059656baa13b1fe03f076e3f3367d80d4 (patch)
tree7de0a5ac5c46344df54fc3d989b1a1af4048026e /fs/jfs
parent250aafb9fec3341af0fc69e8340b7ac276992fca (diff)
downloadkernel-crypto-3af5615059656baa13b1fe03f076e3f3367d80d4.tar.gz
kernel-crypto-3af5615059656baa13b1fe03f076e3f3367d80d4.tar.xz
kernel-crypto-3af5615059656baa13b1fe03f076e3f3367d80d4.zip
jfs: fix diAllocExt error in resizing filesystem
commit 2b0b39517d1af5294128dbc2fd7ed39c8effa540 upstream. Resizing the filesystem would result in an diAllocExt error in some instances because changes in bmp->db_agsize would not get noticed if goto extendBmap was called. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com> Cc: jfs-discussion@lists.sourceforge.net Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/jfs')
-rw-r--r--fs/jfs/resize.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/jfs/resize.c b/fs/jfs/resize.c
index 7f24a0bb08c..1aba0039f1c 100644
--- a/fs/jfs/resize.c
+++ b/fs/jfs/resize.c
@@ -81,6 +81,7 @@ int jfs_extendfs(struct super_block *sb, s64 newLVSize, int newLogSize)
struct inode *iplist[1];
struct jfs_superblock *j_sb, *j_sb2;
uint old_agsize;
+ int agsizechanged = 0;
struct buffer_head *bh, *bh2;
/* If the volume hasn't grown, get out now */
@@ -333,6 +334,9 @@ int jfs_extendfs(struct super_block *sb, s64 newLVSize, int newLogSize)
*/
if ((rc = dbExtendFS(ipbmap, XAddress, nblocks)))
goto error_out;
+
+ agsizechanged |= (bmp->db_agsize != old_agsize);
+
/*
* the map now has extended to cover additional nblocks:
* dn_mapsize = oldMapsize + nblocks;
@@ -432,7 +436,7 @@ int jfs_extendfs(struct super_block *sb, s64 newLVSize, int newLogSize)
* will correctly identify the new ag);
*/
/* if new AG size the same as old AG size, done! */
- if (bmp->db_agsize != old_agsize) {
+ if (agsizechanged) {
if ((rc = diExtendFS(ipimap, ipbmap)))
goto error_out;