diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-07-07 15:12:51 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-07-20 01:44:19 -0400 |
commit | fb408e6ccc32404a05783911b6f3fed56bd17b06 (patch) | |
tree | ad19408c2e4b2f8eaac9e3dc541f432fc85bc2fd | |
parent | a4464dbc0ca6a3ab8e9d1206bc05059dae2a559d (diff) |
get rid of pointless checks for dentry->sb == NULL
it never is...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | fs/cachefiles/bind.c | 1 | ||||
-rw-r--r-- | security/tomoyo/realpath.c | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/fs/cachefiles/bind.c b/fs/cachefiles/bind.c index a2603e7c0bb5..e10c4415e8c3 100644 --- a/fs/cachefiles/bind.c +++ b/fs/cachefiles/bind.c | |||
@@ -129,7 +129,6 @@ static int cachefiles_daemon_add_cache(struct cachefiles_cache *cache) | |||
129 | !root->d_inode->i_op->mkdir || | 129 | !root->d_inode->i_op->mkdir || |
130 | !root->d_inode->i_op->setxattr || | 130 | !root->d_inode->i_op->setxattr || |
131 | !root->d_inode->i_op->getxattr || | 131 | !root->d_inode->i_op->getxattr || |
132 | !root->d_sb || | ||
133 | !root->d_sb->s_op || | 132 | !root->d_sb->s_op || |
134 | !root->d_sb->s_op->statfs || | 133 | !root->d_sb->s_op->statfs || |
135 | !root->d_sb->s_op->sync_fs) | 134 | !root->d_sb->s_op->sync_fs) |
diff --git a/security/tomoyo/realpath.c b/security/tomoyo/realpath.c index d1e05b047715..8d95e91c9fc4 100644 --- a/security/tomoyo/realpath.c +++ b/security/tomoyo/realpath.c | |||
@@ -103,7 +103,7 @@ char *tomoyo_realpath_from_path(struct path *path) | |||
103 | if (!buf) | 103 | if (!buf) |
104 | break; | 104 | break; |
105 | /* Get better name for socket. */ | 105 | /* 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) { |
107 | struct inode *inode = dentry->d_inode; | 107 | struct inode *inode = dentry->d_inode; |
108 | struct socket *sock = inode ? SOCKET_I(inode) : NULL; | 108 | struct socket *sock = inode ? SOCKET_I(inode) : NULL; |
109 | struct sock *sk = sock ? sock->sk : NULL; | 109 | struct sock *sk = sock ? sock->sk : NULL; |