Skip to content

Commit

Permalink
get rid of pointless checks for dentry->sb == NULL
Browse files Browse the repository at this point in the history
it never is...

Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed Jul 20, 2011
1 parent a4464db commit fb408e6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion fs/cachefiles/bind.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion security/tomoyo/realpath.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fb408e6

Please sign in to comment.