diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-05-26 00:24:18 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-06-03 03:05:19 +0200 |
commit | 53aa6bbfdaae6fe71762e66e23c0fda1207beb2b (patch) | |
tree | dfd6e87e7a3fd4898fe856c928928fca72b0d1ba /fs/f2fs/inode.c | |
parent | f2fs: propagate error given by f2fs_find_entry (diff) | |
download | linux-53aa6bbfdaae6fe71762e66e23c0fda1207beb2b.tar.xz linux-53aa6bbfdaae6fe71762e66e23c0fda1207beb2b.zip |
f2fs: inject to produce some orphan inodes
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/inode.c')
-rw-r--r-- | fs/f2fs/inode.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index bdd814db883e..11cb60af815d 100644 --- a/fs/f2fs/inode.c +++ b/fs/f2fs/inode.c @@ -345,6 +345,11 @@ void f2fs_evict_inode(struct inode *inode) if (inode->i_nlink || is_bad_inode(inode)) goto no_delete; +#ifdef CONFIG_F2FS_FAULT_INJECTION + if (time_to_inject(FAULT_EVICT_INODE)) + goto no_delete; +#endif + sb_start_intwrite(inode->i_sb); set_inode_flag(inode, FI_NO_ALLOC); i_size_write(inode, 0); |