diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-06-07 00:34:05 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-08-09 16:48:18 -0400 |
commit | d640e1b50885b5beb61ccacdebf9f3f05ee2119c (patch) | |
tree | 73e9aeaaffbc78a66053d1cea898516503142af5 /fs/ubifs | |
parent | 62aff86fdf18657d9eca7878654415f94f16d027 (diff) |
switch ubifs to ->evict_inode()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ubifs')
-rw-r--r-- | fs/ubifs/super.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index 4d2f2157dd3f..899066dd0c14 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c | |||
@@ -327,7 +327,7 @@ static int ubifs_write_inode(struct inode *inode, struct writeback_control *wbc) | |||
327 | return err; | 327 | return err; |
328 | } | 328 | } |
329 | 329 | ||
330 | static void ubifs_delete_inode(struct inode *inode) | 330 | static void ubifs_evict_inode(struct inode *inode) |
331 | { | 331 | { |
332 | int err; | 332 | int err; |
333 | struct ubifs_info *c = inode->i_sb->s_fs_info; | 333 | struct ubifs_info *c = inode->i_sb->s_fs_info; |
@@ -343,9 +343,12 @@ static void ubifs_delete_inode(struct inode *inode) | |||
343 | 343 | ||
344 | dbg_gen("inode %lu, mode %#x", inode->i_ino, (int)inode->i_mode); | 344 | dbg_gen("inode %lu, mode %#x", inode->i_ino, (int)inode->i_mode); |
345 | ubifs_assert(!atomic_read(&inode->i_count)); | 345 | ubifs_assert(!atomic_read(&inode->i_count)); |
346 | ubifs_assert(inode->i_nlink == 0); | ||
347 | 346 | ||
348 | truncate_inode_pages(&inode->i_data, 0); | 347 | truncate_inode_pages(&inode->i_data, 0); |
348 | |||
349 | if (inode->i_nlink) | ||
350 | goto done; | ||
351 | |||
349 | if (is_bad_inode(inode)) | 352 | if (is_bad_inode(inode)) |
350 | goto out; | 353 | goto out; |
351 | 354 | ||
@@ -367,7 +370,8 @@ out: | |||
367 | c->nospace = c->nospace_rp = 0; | 370 | c->nospace = c->nospace_rp = 0; |
368 | smp_wmb(); | 371 | smp_wmb(); |
369 | } | 372 | } |
370 | clear_inode(inode); | 373 | done: |
374 | end_writeback(inode); | ||
371 | } | 375 | } |
372 | 376 | ||
373 | static void ubifs_dirty_inode(struct inode *inode) | 377 | static void ubifs_dirty_inode(struct inode *inode) |
@@ -1824,7 +1828,7 @@ const struct super_operations ubifs_super_operations = { | |||
1824 | .destroy_inode = ubifs_destroy_inode, | 1828 | .destroy_inode = ubifs_destroy_inode, |
1825 | .put_super = ubifs_put_super, | 1829 | .put_super = ubifs_put_super, |
1826 | .write_inode = ubifs_write_inode, | 1830 | .write_inode = ubifs_write_inode, |
1827 | .delete_inode = ubifs_delete_inode, | 1831 | .evict_inode = ubifs_evict_inode, |
1828 | .statfs = ubifs_statfs, | 1832 | .statfs = ubifs_statfs, |
1829 | .dirty_inode = ubifs_dirty_inode, | 1833 | .dirty_inode = ubifs_dirty_inode, |
1830 | .remount_fs = ubifs_remount_fs, | 1834 | .remount_fs = ubifs_remount_fs, |