diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-06-04 20:19:55 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-08-09 16:47:48 -0400 |
commit | 661074e91b1da1ee262dfde6dd836deacccb9def (patch) | |
tree | 97227898352c3bea7975fcc0bb98a8e013b1d03b /fs/inode.c | |
parent | c6287315cb958e740466555ca5e9d007f25b39bd (diff) |
Take ->i_bdev/->i_cdev handling out of clear_inode()
All call chains to clear_inode() pass through evict_inode() and
clear_inode() should be called by evict_inode() exactly once.
So we can pull i_bdev/i_cdev detaching up to evict_inode() itself.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/inode.c')
-rw-r--r-- | fs/inode.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/inode.c b/fs/inode.c index 256e620c6416..9aff7deaf816 100644 --- a/fs/inode.c +++ b/fs/inode.c | |||
@@ -313,10 +313,6 @@ void clear_inode(struct inode *inode) | |||
313 | inode_sync_wait(inode); | 313 | inode_sync_wait(inode); |
314 | if (inode->i_sb->s_op->clear_inode) | 314 | if (inode->i_sb->s_op->clear_inode) |
315 | inode->i_sb->s_op->clear_inode(inode); | 315 | inode->i_sb->s_op->clear_inode(inode); |
316 | if (S_ISBLK(inode->i_mode) && inode->i_bdev) | ||
317 | bd_forget(inode); | ||
318 | if (S_ISCHR(inode->i_mode) && inode->i_cdev) | ||
319 | cd_forget(inode); | ||
320 | inode->i_state = I_FREEING | I_CLEAR; | 316 | inode->i_state = I_FREEING | I_CLEAR; |
321 | } | 317 | } |
322 | EXPORT_SYMBOL(clear_inode); | 318 | EXPORT_SYMBOL(clear_inode); |
@@ -334,6 +330,10 @@ static void evict(struct inode *inode, int delete) | |||
334 | truncate_inode_pages(&inode->i_data, 0); | 330 | truncate_inode_pages(&inode->i_data, 0); |
335 | clear_inode(inode); | 331 | clear_inode(inode); |
336 | } | 332 | } |
333 | if (S_ISBLK(inode->i_mode) && inode->i_bdev) | ||
334 | bd_forget(inode); | ||
335 | if (S_ISCHR(inode->i_mode) && inode->i_cdev) | ||
336 | cd_forget(inode); | ||
337 | } | 337 | } |
338 | 338 | ||
339 | /* | 339 | /* |