get rid of pointless checks for dentry->sb == NULL
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 7 Jul 2011 19:12:51 +0000 (15:12 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 20 Jul 2011 05:44:19 +0000 (01:44 -0400)
it never is...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/cachefiles/bind.c
security/tomoyo/realpath.c

index a2603e7c0bb5bba58d34ddab5d9b36385cbd3afe..e10c4415e8c3bfa744463054ef39088a7ef7abdc 100644 (file)
@@ -129,7 +129,6 @@ static int cachefiles_daemon_add_cache(struct cachefiles_cache *cache)
            !root->d_inode->i_op->mkdir ||
            !root->d_inode->i_op->setxattr ||
            !root->d_inode->i_op->getxattr ||
-           !root->d_sb ||
            !root->d_sb->s_op ||
            !root->d_sb->s_op->statfs ||
            !root->d_sb->s_op->sync_fs)
index d1e05b0477154447ce7cb75dcdb3cb8e2ed94259..8d95e91c9fc4bdd070b1f29038876cd37cc7c31b 100644 (file)
@@ -103,7 +103,7 @@ char *tomoyo_realpath_from_path(struct path *path)
                if (!buf)
                        break;
                /* Get better name for socket. */
-               if (dentry->d_sb && dentry->d_sb->s_magic == SOCKFS_MAGIC) {
+               if (dentry->d_sb->s_magic == SOCKFS_MAGIC) {
                        struct inode *inode = dentry->d_inode;
                        struct socket *sock = inode ? SOCKET_I(inode) : NULL;
                        struct sock *sk = sock ? sock->sk : NULL;