diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1999-09-28 22:25:29 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1999-09-28 22:25:29 +0000 |
commit | 0ae8dceaebe3659ee0c3352c08125f403e77ebca (patch) | |
tree | 5085c389f09da78182b899d19fe1068b619a69dd /fs/ufs | |
parent | 273767781288c35c9d679e908672b9996cda4c34 (diff) |
Merge with 2.3.10.
Diffstat (limited to 'fs/ufs')
-rw-r--r-- | fs/ufs/balloc.c | 22 | ||||
-rw-r--r-- | fs/ufs/super.c | 3 |
2 files changed, 17 insertions, 8 deletions
diff --git a/fs/ufs/balloc.c b/fs/ufs/balloc.c index b464318a7..c75a3a405 100644 --- a/fs/ufs/balloc.c +++ b/fs/ufs/balloc.c @@ -360,14 +360,22 @@ unsigned ufs_new_fragments (struct inode * inode, u32 * p, unsigned fragment, if (result) { for (i = 0; i < oldcount; i++) { bh = bread (sb->s_dev, tmp + i, sb->s_blocksize); - mark_buffer_clean (bh); - bh->b_blocknr = result + i; - mark_buffer_dirty (bh, 0); - if (IS_SYNC(inode)) { - ll_rw_block (WRITE, 1, &bh); - wait_on_buffer (bh); + if(bh) + { + mark_buffer_clean (bh); + bh->b_blocknr = result + i; + mark_buffer_dirty (bh, 0); + if (IS_SYNC(inode)) { + ll_rw_block (WRITE, 1, &bh); + wait_on_buffer (bh); + } + brelse (bh); + } + else + { + printk(KERN_ERR "ufs_new_fragments: bread fail\n"); + return 0; } - brelse (bh); } *p = SWAB32(result); *err = 0; diff --git a/fs/ufs/super.c b/fs/ufs/super.c index 12937adcf..b6a1f8ef6 100644 --- a/fs/ufs/super.c +++ b/fs/ufs/super.c @@ -467,7 +467,8 @@ struct super_block * ufs_read_super (struct super_block * sb, void * data, } if (!(sb->u.ufs_sb.s_mount_opt & UFS_MOUNT_UFSTYPE)) { printk("You didn't specify the type of your ufs filesystem\n\n" - " mount -t ufs -o ufstype=sun|sunx86|44bsd|old|nextstep|netxstep-cd|openstep ...\n\n" + "mount -t ufs -o ufstype=" + "sun|sunx86|44bsd|old|nextstep|netxstep-cd|openstep ...\n\n" ">>>WARNING<<< Wrong ufstype may corrupt your filesystem, " "default is ufstype=old\n"); ufs_set_opt (sb->u.ufs_sb.s_mount_opt, UFSTYPE_OLD); |