summaryrefslogtreecommitdiff
path: root/fs/cifs/xattr.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-04-10 01:33:30 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2016-04-10 17:11:51 -0400
commitfc64005c93090c052637f63578d810b037abb1a1 (patch)
tree7762f9680fd773cf265465b0e5f95e4732b90def /fs/cifs/xattr.c
parent04c57f4501909b60353031cfe5b991751d745658 (diff)
don't bother with ->d_inode->i_sb - it's always equal to ->d_sb
... and neither can ever be NULL Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/cifs/xattr.c')
-rw-r--r--fs/cifs/xattr.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/fs/cifs/xattr.c b/fs/cifs/xattr.c
index f5dc2f0df4ad..612de933431f 100644
--- a/fs/cifs/xattr.c
+++ b/fs/cifs/xattr.c
@@ -52,9 +52,7 @@ int cifs_removexattr(struct dentry *direntry, const char *ea_name)
return -EIO;
if (d_really_is_negative(direntry))
return -EIO;
- sb = d_inode(direntry)->i_sb;
- if (sb == NULL)
- return -EIO;
+ sb = direntry->d_sb;
cifs_sb = CIFS_SB(sb);
tlink = cifs_sb_tlink(cifs_sb);
@@ -113,9 +111,7 @@ int cifs_setxattr(struct dentry *direntry, const char *ea_name,
return -EIO;
if (d_really_is_negative(direntry))
return -EIO;
- sb = d_inode(direntry)->i_sb;
- if (sb == NULL)
- return -EIO;
+ sb = direntry->d_sb;
cifs_sb = CIFS_SB(sb);
tlink = cifs_sb_tlink(cifs_sb);
@@ -248,9 +244,7 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name,
return -EIO;
if (d_really_is_negative(direntry))
return -EIO;
- sb = d_inode(direntry)->i_sb;
- if (sb == NULL)
- return -EIO;
+ sb = direntry->d_sb;
cifs_sb = CIFS_SB(sb);
tlink = cifs_sb_tlink(cifs_sb);
@@ -384,9 +378,7 @@ ssize_t cifs_listxattr(struct dentry *direntry, char *data, size_t buf_size)
return -EIO;
if (d_really_is_negative(direntry))
return -EIO;
- sb = d_inode(direntry)->i_sb;
- if (sb == NULL)
- return -EIO;
+ sb = direntry->d_sb;
cifs_sb = CIFS_SB(sb);
if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)