summaryrefslogtreecommitdiff
path: root/fs/ntfs3/namei.c
diff options
context:
space:
mode:
authorKonstantin Komarov <almaz.alexandrovich@paragon-software.com>2022-12-30 14:58:25 +0400
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>2023-03-27 16:59:16 +0400
commit6827d50b2c430c329af442b64c9176d174f56521 (patch)
tree772985fcd8a05f998155d2ac26137681be6b4b1b /fs/ntfs3/namei.c
parent30200ef8d1368f0dee424d5926bd7af0cdc87b54 (diff)
fs/ntfs3: Refactoring of various minor issues
Removed unused macro. Changed null pointer checking. Fixed inconsistent indenting. Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Diffstat (limited to 'fs/ntfs3/namei.c')
-rw-r--r--fs/ntfs3/namei.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ntfs3/namei.c b/fs/ntfs3/namei.c
index 8d206770d8c6..92bbc8ee83ca 100644
--- a/fs/ntfs3/namei.c
+++ b/fs/ntfs3/namei.c
@@ -93,7 +93,7 @@ static struct dentry *ntfs_lookup(struct inode *dir, struct dentry *dentry,
* If the MFT record of ntfs inode is not a base record, inode->i_op can be NULL.
* This causes null pointer dereference in d_splice_alias().
*/
- if (!IS_ERR(inode) && inode->i_op == NULL) {
+ if (!IS_ERR_OR_NULL(inode) && !inode->i_op) {
iput(inode);
inode = ERR_PTR(-EINVAL);
}