diff options
author | Konstantin Komarov <almaz.alexandrovich@paragon-software.com> | 2022-07-13 17:55:27 +0300 |
---|---|---|
committer | Konstantin Komarov <almaz.alexandrovich@paragon-software.com> | 2022-08-03 18:25:08 +0300 |
commit | c12df45ee690112782049b8e85dff2e6cb1b3853 (patch) | |
tree | f7b58c34fb89566dc8a17ae470fa4db6bf85cc7f /fs/ntfs3/namei.c | |
parent | 8335ebe195dcc76ece418485a9f08b9a9ad7fe23 (diff) | |
download | lwn-c12df45ee690112782049b8e85dff2e6cb1b3853.tar.gz lwn-c12df45ee690112782049b8e85dff2e6cb1b3853.zip |
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/namei.c')
-rw-r--r-- | fs/ntfs3/namei.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/ntfs3/namei.c b/fs/ntfs3/namei.c index 1cc700760c7e..bc22cc321a74 100644 --- a/fs/ntfs3/namei.c +++ b/fs/ntfs3/namei.c @@ -308,9 +308,7 @@ static int ntfs_rename(struct user_namespace *mnt_userns, struct inode *dir, err = ni_rename(dir_ni, new_dir_ni, ni, de, new_de, &is_bad); if (is_bad) { /* Restore after failed rename failed too. */ - make_bad_inode(inode); - ntfs_inode_err(inode, "failed to undo rename"); - ntfs_set_state(sbi, NTFS_DIRTY_ERROR); + _ntfs_bad_inode(inode); } else if (!err) { inode->i_ctime = dir->i_ctime = dir->i_mtime = current_time(dir); |