diff options
author | Konstantin Komarov | 2022-07-13 17:55:27 +0300 |
---|---|---|
committer | Konstantin Komarov | 2022-08-03 18:25:08 +0300 |
commit | c12df45ee690112782049b8e85dff2e6cb1b3853 (patch) | |
tree | f7b58c34fb89566dc8a17ae470fa4db6bf85cc7f /fs/ntfs3/inode.c | |
parent | 8335ebe195dcc76ece418485a9f08b9a9ad7fe23 (diff) |
fs/ntfs3: New function ntfs_bad_inode
There are repetitive steps in case of bad inode
This commit wraps them in function
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Diffstat (limited to 'fs/ntfs3/inode.c')
-rw-r--r-- | fs/ntfs3/inode.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/ntfs3/inode.c b/fs/ntfs3/inode.c index 3ed319663747..cd48687127c1 100644 --- a/fs/ntfs3/inode.c +++ b/fs/ntfs3/inode.c @@ -501,7 +501,7 @@ struct inode *ntfs_iget5(struct super_block *sb, const struct MFT_REF *ref, inode = ntfs_read_mft(inode, name, ref); else if (ref->seq != ntfs_i(inode)->mi.mrec->seq) { /* Inode overlaps? */ - make_bad_inode(inode); + _ntfs_bad_inode(inode); } return inode; @@ -1725,9 +1725,7 @@ int ntfs_unlink_inode(struct inode *dir, const struct dentry *dentry) if (inode->i_nlink) mark_inode_dirty(inode); } else if (!ni_remove_name_undo(dir_ni, ni, de, de2, undo_remove)) { - make_bad_inode(inode); - ntfs_inode_err(inode, "failed to undo unlink"); - ntfs_set_state(sbi, NTFS_DIRTY_ERROR); + _ntfs_bad_inode(inode); } else { if (ni_is_dirty(dir)) mark_inode_dirty(dir); |