diff options
Diffstat (limited to 'fs/logfs/inode.c')
-rw-r--r-- | fs/logfs/inode.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/fs/logfs/inode.c b/fs/logfs/inode.c index a422f42238b2..6984562738d3 100644 --- a/fs/logfs/inode.c +++ b/fs/logfs/inode.c | |||
@@ -156,10 +156,26 @@ static void __logfs_destroy_inode(struct inode *inode) | |||
156 | call_rcu(&inode->i_rcu, logfs_i_callback); | 156 | call_rcu(&inode->i_rcu, logfs_i_callback); |
157 | } | 157 | } |
158 | 158 | ||
159 | static void __logfs_destroy_meta_inode(struct inode *inode) | ||
160 | { | ||
161 | struct logfs_inode *li = logfs_inode(inode); | ||
162 | BUG_ON(li->li_block); | ||
163 | call_rcu(&inode->i_rcu, logfs_i_callback); | ||
164 | } | ||
165 | |||
159 | static void logfs_destroy_inode(struct inode *inode) | 166 | static void logfs_destroy_inode(struct inode *inode) |
160 | { | 167 | { |
161 | struct logfs_inode *li = logfs_inode(inode); | 168 | struct logfs_inode *li = logfs_inode(inode); |
162 | 169 | ||
170 | if (inode->i_ino < LOGFS_RESERVED_INOS) { | ||
171 | /* | ||
172 | * The reserved inodes are never destroyed unless we are in | ||
173 | * unmont path. | ||
174 | */ | ||
175 | __logfs_destroy_meta_inode(inode); | ||
176 | return; | ||
177 | } | ||
178 | |||
163 | BUG_ON(list_empty(&li->li_freeing_list)); | 179 | BUG_ON(list_empty(&li->li_freeing_list)); |
164 | spin_lock(&logfs_inode_lock); | 180 | spin_lock(&logfs_inode_lock); |
165 | li->li_refcount--; | 181 | li->li_refcount--; |
@@ -373,8 +389,8 @@ static void logfs_put_super(struct super_block *sb) | |||
373 | { | 389 | { |
374 | struct logfs_super *super = logfs_super(sb); | 390 | struct logfs_super *super = logfs_super(sb); |
375 | /* kill the meta-inodes */ | 391 | /* kill the meta-inodes */ |
376 | iput(super->s_master_inode); | ||
377 | iput(super->s_segfile_inode); | 392 | iput(super->s_segfile_inode); |
393 | iput(super->s_master_inode); | ||
378 | iput(super->s_mapping_inode); | 394 | iput(super->s_mapping_inode); |
379 | } | 395 | } |
380 | 396 | ||