Skip to content

Commit 627bf81

Browse files
author
Al Viro
committed
get rid of pointless checks for NULL ->i_op
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 05faf31 commit 627bf81

5 files changed

Lines changed: 5 additions & 7 deletions

File tree

‎fs/cachefiles/bind.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ static int cachefiles_daemon_add_cache(struct cachefiles_cache *cache)
124124
/* check parameters */
125125
ret = -EOPNOTSUPP;
126126
if (!root->d_inode ||
127-
!root->d_inode->i_op ||
128127
!root->d_inode->i_op->lookup ||
129128
!root->d_inode->i_op->mkdir ||
130129
!root->d_inode->i_op->setxattr ||

‎fs/cachefiles/namei.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -779,8 +779,7 @@ struct dentry *cachefiles_get_directory(struct cachefiles_cache *cache,
779779
}
780780

781781
ret = -EPERM;
782-
if (!subdir->d_inode->i_op ||
783-
!subdir->d_inode->i_op->setxattr ||
782+
if (!subdir->d_inode->i_op->setxattr ||
784783
!subdir->d_inode->i_op->getxattr ||
785784
!subdir->d_inode->i_op->lookup ||
786785
!subdir->d_inode->i_op->mkdir ||

‎security/integrity/evm/evm_crypto.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ static int evm_calc_hmac_or_hash(struct dentry *dentry,
137137
int error;
138138
int size;
139139

140-
if (!inode->i_op || !inode->i_op->getxattr)
140+
if (!inode->i_op->getxattr)
141141
return -EOPNOTSUPP;
142142
desc = init_desc(type);
143143
if (IS_ERR(desc))

‎security/integrity/evm/evm_main.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static int evm_find_protected_xattrs(struct dentry *dentry)
6262
int error;
6363
int count = 0;
6464

65-
if (!inode->i_op || !inode->i_op->getxattr)
65+
if (!inode->i_op->getxattr)
6666
return -EOPNOTSUPP;
6767

6868
for (xattr = evm_config_xattrnames; *xattr != NULL; xattr++) {

‎security/tomoyo/realpath.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ static char *tomoyo_get_local_path(struct dentry *dentry, char * const buffer,
173173
* Use filesystem name if filesystem does not support rename()
174174
* operation.
175175
*/
176-
if (inode->i_op && !inode->i_op->rename)
176+
if (!inode->i_op->rename)
177177
goto prepend_filesystem_name;
178178
}
179179
/* Prepend device name. */
@@ -282,7 +282,7 @@ char *tomoyo_realpath_from_path(struct path *path)
282282
* Get local name for filesystems without rename() operation
283283
* or dentry without vfsmount.
284284
*/
285-
if (!path->mnt || (inode->i_op && !inode->i_op->rename))
285+
if (!path->mnt || !inode->i_op->rename)
286286
pos = tomoyo_get_local_path(path->dentry, buf,
287287
buf_len - 1);
288288
/* Get absolute name for the rest. */

0 commit comments

Comments
 (0)