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/fsntfs.c | |
parent | 8335ebe195dcc76ece418485a9f08b9a9ad7fe23 (diff) | |
download | linux-c12df45ee690112782049b8e85dff2e6cb1b3853.tar.xz |
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/fsntfs.c')
-rw-r--r-- | fs/ntfs3/fsntfs.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/ntfs3/fsntfs.c b/fs/ntfs3/fsntfs.c index af1dca273b59..3f9903baa53f 100644 --- a/fs/ntfs3/fsntfs.c +++ b/fs/ntfs3/fsntfs.c @@ -878,6 +878,20 @@ void ntfs_update_mftmirr(struct ntfs_sb_info *sbi, int wait) } /* + * ntfs_bad_inode + * + * Marks inode as bad and marks fs as 'dirty' + */ +void ntfs_bad_inode(struct inode *inode, const char *hint) +{ + struct ntfs_sb_info *sbi = inode->i_sb->s_fs_info; + + ntfs_inode_err(inode, "%s", hint); + make_bad_inode(inode); + ntfs_set_state(sbi, NTFS_DIRTY_ERROR); +} + +/* * ntfs_set_state * * Mount: ntfs_set_state(NTFS_DIRTY_DIRTY) |