patch-2.4.21 linux-2.4.21/fs/jfs/resize.c

Next file: linux-2.4.21/fs/jfs/super.c
Previous file: linux-2.4.21/fs/jfs/namei.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.20/fs/jfs/resize.c linux-2.4.21/fs/jfs/resize.c
@@ -29,6 +29,8 @@
 #include "jfs_txnmgr.h"
 #include "jfs_debug.h"
 
+extern s64 jfs_get_volume_size(struct super_block *);
+
 #define BITSPERPAGE     (PSIZE << 3)
 #define L2MEGABYTE      20
 #define MEGABYTE        (1 << L2MEGABYTE)
@@ -97,7 +99,7 @@
 		goto out;
 	}
 
-	VolumeSize = sb->s_bdev->bd_inode->i_size >> sb->s_blocksize_bits;
+	VolumeSize = jfs_get_volume_size(sb);
 	if (VolumeSize) {
 		if (newLVSize > VolumeSize) {
 			printk(KERN_WARNING "jfs_extendfs: invalid size\n");
@@ -512,7 +514,7 @@
 		mark_buffer_dirty(bh);
 		ll_rw_block(WRITE, 1, &bh2);
 		wait_on_buffer(bh2);
-		brelse(bh);
+		brelse(bh2);
 	}
 
 	/* write primary superblock */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)