summaryrefslogtreecommitdiff
path: root/fs/ntfs3/attrib.c
diff options
context:
space:
mode:
authorKonstantin Komarov <almaz.alexandrovich@paragon-software.com>2022-07-13 17:55:27 +0300
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>2022-08-03 18:25:08 +0300
commitc12df45ee690112782049b8e85dff2e6cb1b3853 (patch)
treef7b58c34fb89566dc8a17ae470fa4db6bf85cc7f /fs/ntfs3/attrib.c
parent8335ebe195dcc76ece418485a9f08b9a9ad7fe23 (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/attrib.c')
-rw-r--r--fs/ntfs3/attrib.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/ntfs3/attrib.c b/fs/ntfs3/attrib.c
index 7454bd3ea02d..5ba83eb0fc07 100644
--- a/fs/ntfs3/attrib.c
+++ b/fs/ntfs3/attrib.c
@@ -1912,7 +1912,7 @@ next_attr:
out:
up_write(&ni->file.run_lock);
if (err)
- make_bad_inode(&ni->vfs_inode);
+ _ntfs_bad_inode(&ni->vfs_inode);
return err;
}
@@ -2092,10 +2092,8 @@ int attr_punch_hole(struct ntfs_inode *ni, u64 vbo, u64 bytes, u32 *frame_size)
out:
up_write(&ni->file.run_lock);
- if (err) {
- ntfs_set_state(sbi, NTFS_DIRTY_ERROR);
- make_bad_inode(&ni->vfs_inode);
- }
+ if (err)
+ _ntfs_bad_inode(&ni->vfs_inode);
return err;
}
@@ -2282,7 +2280,7 @@ out:
up_write(&ni->file.run_lock);
if (err)
- make_bad_inode(&ni->vfs_inode);
+ _ntfs_bad_inode(&ni->vfs_inode);
return err;
}