aboutsummaryrefslogtreecommitdiffstats
path: root/fs/reiserfs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/reiserfs/super.c')
-rw-r--r--fs/reiserfs/super.c31
1 files changed, 20 insertions, 11 deletions
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index c89aa2338191..9041802df832 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -430,20 +430,29 @@ int remove_save_link(struct inode *inode, int truncate)
430 return journal_end(&th, inode->i_sb, JOURNAL_PER_BALANCE_CNT); 430 return journal_end(&th, inode->i_sb, JOURNAL_PER_BALANCE_CNT);
431} 431}
432 432
433static void reiserfs_put_super(struct super_block *s) 433static void reiserfs_kill_sb(struct super_block *s)
434{ 434{
435 struct reiserfs_transaction_handle th; 435 if (REISERFS_SB(s)) {
436 th.t_trans_id = 0; 436 if (REISERFS_SB(s)->xattr_root) {
437 d_invalidate(REISERFS_SB(s)->xattr_root);
438 dput(REISERFS_SB(s)->xattr_root);
439 REISERFS_SB(s)->xattr_root = NULL;
440 }
437 441
438 if (REISERFS_SB(s)->xattr_root) { 442 if (REISERFS_SB(s)->priv_root) {
439 d_invalidate(REISERFS_SB(s)->xattr_root); 443 d_invalidate(REISERFS_SB(s)->priv_root);
440 dput(REISERFS_SB(s)->xattr_root); 444 dput(REISERFS_SB(s)->priv_root);
445 REISERFS_SB(s)->priv_root = NULL;
446 }
441 } 447 }
442 448
443 if (REISERFS_SB(s)->priv_root) { 449 kill_block_super(s);
444 d_invalidate(REISERFS_SB(s)->priv_root); 450}
445 dput(REISERFS_SB(s)->priv_root); 451
446 } 452static void reiserfs_put_super(struct super_block *s)
453{
454 struct reiserfs_transaction_handle th;
455 th.t_trans_id = 0;
447 456
448 /* change file system state to current state if it was mounted with read-write permissions */ 457 /* change file system state to current state if it was mounted with read-write permissions */
449 if (!(s->s_flags & MS_RDONLY)) { 458 if (!(s->s_flags & MS_RDONLY)) {
@@ -2156,7 +2165,7 @@ struct file_system_type reiserfs_fs_type = {
2156 .owner = THIS_MODULE, 2165 .owner = THIS_MODULE,
2157 .name = "reiserfs", 2166 .name = "reiserfs",
2158 .get_sb = get_super_block, 2167 .get_sb = get_super_block,
2159 .kill_sb = kill_block_super, 2168 .kill_sb = reiserfs_kill_sb,
2160 .fs_flags = FS_REQUIRES_DEV, 2169 .fs_flags = FS_REQUIRES_DEV,
2161}; 2170};
2162 2171