Skip to content

Commit fb408e6

Browse files
author
Al Viro
committed
get rid of pointless checks for dentry->sb == NULL
it never is... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent a4464db commit fb408e6

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

fs/cachefiles/bind.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ static int cachefiles_daemon_add_cache(struct cachefiles_cache *cache)
129129
!root->d_inode->i_op->mkdir ||
130130
!root->d_inode->i_op->setxattr ||
131131
!root->d_inode->i_op->getxattr ||
132-
!root->d_sb ||
133132
!root->d_sb->s_op ||
134133
!root->d_sb->s_op->statfs ||
135134
!root->d_sb->s_op->sync_fs)

security/tomoyo/realpath.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ char *tomoyo_realpath_from_path(struct path *path)
103103
if (!buf)
104104
break;
105105
/* Get better name for socket. */
106-
if (dentry->d_sb && dentry->d_sb->s_magic == SOCKFS_MAGIC) {
106+
if (dentry->d_sb->s_magic == SOCKFS_MAGIC) {
107107
struct inode *inode = dentry->d_inode;
108108
struct socket *sock = inode ? SOCKET_I(inode) : NULL;
109109
struct sock *sk = sock ? sock->sk : NULL;

0 commit comments

Comments
 (0)