diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-12-16 09:18:15 +0100 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-01-29 04:46:00 +0100 |
commit | 07fe8d44409f88be8f4a4e8f22b47ee709a22657 (patch) | |
tree | e7fcbd94220b9f639d524dedd19568f7e8367ac1 /fs/f2fs/namei.c | |
parent | f2fs: don't cache nat entry if out of memory (diff) | |
download | linux-07fe8d44409f88be8f4a4e8f22b47ee709a22657.tar.xz linux-07fe8d44409f88be8f4a4e8f22b47ee709a22657.zip |
f2fs: remove unneeded condition
We checked that "inode" is not an error pointer earlier so there is
no need to check again here.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/namei.c')
-rw-r--r-- | fs/f2fs/namei.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index 56c19b0610a8..290a9d7060ef 100644 --- a/fs/f2fs/namei.c +++ b/fs/f2fs/namei.c @@ -321,9 +321,9 @@ static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry, if (err) goto err_out; } - if (!IS_ERR(inode) && f2fs_encrypted_inode(dir) && - (S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode)) && - !fscrypt_has_permitted_context(dir, inode)) { + if (f2fs_encrypted_inode(dir) && + (S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode)) && + !fscrypt_has_permitted_context(dir, inode)) { bool nokey = f2fs_encrypted_inode(inode) && !fscrypt_has_encryption_key(inode); err = nokey ? -ENOKEY : -EPERM; |