diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2019-04-15 22:36:59 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2019-05-01 22:43:26 -0400 |
commit | a2b757fe0fcd46f32ee35882610a797cd3dcda6f (patch) | |
tree | 03cc797b9bd3caabb9d399fd150a4830314fd4d9 /fs/ntfs/inode.c | |
parent | f614ee1e3ea7ac155f827294fccb4816552c99ec (diff) |
ntfs: switch to ->free_inode()
move the synchronous stuff from ->destroy_inode() to ->evict_inode(),
turn the RCU-delayed part into ->free_inode()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ntfs/inode.c')
-rw-r--r-- | fs/ntfs/inode.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/fs/ntfs/inode.c b/fs/ntfs/inode.c index bd3221cbdd95..fb1a2b49a5da 100644 --- a/fs/ntfs/inode.c +++ b/fs/ntfs/inode.c | |||
@@ -332,23 +332,11 @@ struct inode *ntfs_alloc_big_inode(struct super_block *sb) | |||
332 | return NULL; | 332 | return NULL; |
333 | } | 333 | } |
334 | 334 | ||
335 | static void ntfs_i_callback(struct rcu_head *head) | 335 | void ntfs_free_big_inode(struct inode *inode) |
336 | { | 336 | { |
337 | struct inode *inode = container_of(head, struct inode, i_rcu); | ||
338 | kmem_cache_free(ntfs_big_inode_cache, NTFS_I(inode)); | 337 | kmem_cache_free(ntfs_big_inode_cache, NTFS_I(inode)); |
339 | } | 338 | } |
340 | 339 | ||
341 | void ntfs_destroy_big_inode(struct inode *inode) | ||
342 | { | ||
343 | ntfs_inode *ni = NTFS_I(inode); | ||
344 | |||
345 | ntfs_debug("Entering."); | ||
346 | BUG_ON(ni->page); | ||
347 | if (!atomic_dec_and_test(&ni->count)) | ||
348 | BUG(); | ||
349 | call_rcu(&inode->i_rcu, ntfs_i_callback); | ||
350 | } | ||
351 | |||
352 | static inline ntfs_inode *ntfs_alloc_extent_inode(void) | 340 | static inline ntfs_inode *ntfs_alloc_extent_inode(void) |
353 | { | 341 | { |
354 | ntfs_inode *ni; | 342 | ntfs_inode *ni; |
@@ -2287,6 +2275,9 @@ void ntfs_evict_big_inode(struct inode *vi) | |||
2287 | ni->ext.base_ntfs_ino = NULL; | 2275 | ni->ext.base_ntfs_ino = NULL; |
2288 | } | 2276 | } |
2289 | } | 2277 | } |
2278 | BUG_ON(ni->page); | ||
2279 | if (!atomic_dec_and_test(&ni->count)) | ||
2280 | BUG(); | ||
2290 | return; | 2281 | return; |
2291 | } | 2282 | } |
2292 | 2283 | ||