summaryrefslogtreecommitdiffstats
path: root/fs/sysv/inode.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-05-07 02:55:41 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-05-07 02:55:41 +0000
commitdcec8a13bf565e47942a1751a9cec21bec5648fe (patch)
tree548b69625b18cc2e88c3e68d0923be546c9ebb03 /fs/sysv/inode.c
parent2e0f55e79c49509b7ff70ff1a10e1e9e90a3dfd4 (diff)
o Merge with Linux 2.1.99.
o Fix ancient bug in the ELF loader making ldd crash. o Fix ancient bug in the keyboard code for SGI, SNI and Jazz.
Diffstat (limited to 'fs/sysv/inode.c')
-rw-r--r--fs/sysv/inode.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/sysv/inode.c b/fs/sysv/inode.c
index 25dbe55df..583b94c25 100644
--- a/fs/sysv/inode.c
+++ b/fs/sysv/inode.c
@@ -492,12 +492,14 @@ struct super_block *sysv_read_super(struct super_block *sb,void *data,
sb->s_op = &sysv_sops;
root_inode = iget(sb,SYSV_ROOT_INO);
sb->s_root = d_alloc_root(root_inode, NULL);
- unlock_super(sb);
if (!sb->s_root) {
printk("SysV FS: get root inode failed\n");
sysv_put_super(sb);
+ sb->s_dev = 0;
+ unlock_super(sb);
return NULL;
}
+ unlock_super(sb);
sb->s_dirt = 1;
/* brelse(bh); resp. brelse(bh1); brelse(bh2);
occurs when the disk is unmounted. */
@@ -530,15 +532,14 @@ void sysv_write_super (struct super_block *sb)
void sysv_put_super(struct super_block *sb)
{
- /* we can assume sysv_write_super() has already been called */
- lock_super(sb);
+ /* we can assume sysv_write_super() has already been called, and
+ and that the superblock is locked */
brelse(sb->sv_bh1);
if (sb->sv_bh1 != sb->sv_bh2) brelse(sb->sv_bh2);
/* switch back to default block size */
if (sb->s_blocksize != BLOCK_SIZE)
set_blocksize(sb->s_dev,BLOCK_SIZE);
- sb->s_dev = 0;
- unlock_super(sb);
+
MOD_DEC_USE_COUNT;
}