[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100510223540.159779581@kvm.kroah.org>
Date: Mon, 10 May 2010 15:35:16 -0700
From: Greg KH <gregkh@...e.de>
To: linux-kernel@...r.kernel.org, stable@...nel.org
Cc: stable-review@...nel.org, torvalds@...ux-foundation.org,
akpm@...ux-foundation.org, alan@...rguk.ukuu.org.uk,
Bill Pemberton <wfp5p@...ginia.edu>,
Dave Kleikamp <shaggy@...ux.vnet.ibm.com>,
jfs-discussion@...ts.sourceforge.net
Subject: [64/98] jfs: fix diAllocExt error in resizing filesystem
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Bill Pemberton <wfp5p@...ginia.edu>
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@...ginia.edu>
Signed-off-by: Dave Kleikamp <shaggy@...ux.vnet.ibm.com>
Cc: jfs-discussion@...ts.sourceforge.net
Cc: linux-kernel@...r.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
---
fs/jfs/resize.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- a/fs/jfs/resize.c
+++ b/fs/jfs/resize.c
@@ -81,6 +81,7 @@ int jfs_extendfs(struct super_block *sb,
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,
*/
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,
* 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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists