diff options
Diffstat (limited to 'security/commoncap.c')
-rw-r--r-- | security/commoncap.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/security/commoncap.c b/security/commoncap.c index c25e0d27537f..fc46f5b85251 100644 --- a/security/commoncap.c +++ b/security/commoncap.c | |||
@@ -585,13 +585,14 @@ int get_vfs_caps_from_disk(const struct dentry *dentry, struct cpu_vfs_cap_data | |||
585 | struct vfs_ns_cap_data data, *nscaps = &data; | 585 | struct vfs_ns_cap_data data, *nscaps = &data; |
586 | struct vfs_cap_data *caps = (struct vfs_cap_data *) &data; | 586 | struct vfs_cap_data *caps = (struct vfs_cap_data *) &data; |
587 | kuid_t rootkuid; | 587 | kuid_t rootkuid; |
588 | struct user_namespace *fs_ns = inode->i_sb->s_user_ns; | 588 | struct user_namespace *fs_ns; |
589 | 589 | ||
590 | memset(cpu_caps, 0, sizeof(struct cpu_vfs_cap_data)); | 590 | memset(cpu_caps, 0, sizeof(struct cpu_vfs_cap_data)); |
591 | 591 | ||
592 | if (!inode) | 592 | if (!inode) |
593 | return -ENODATA; | 593 | return -ENODATA; |
594 | 594 | ||
595 | fs_ns = inode->i_sb->s_user_ns; | ||
595 | size = __vfs_getxattr((struct dentry *)dentry, inode, | 596 | size = __vfs_getxattr((struct dentry *)dentry, inode, |
596 | XATTR_NAME_CAPS, &data, XATTR_CAPS_SZ); | 597 | XATTR_NAME_CAPS, &data, XATTR_CAPS_SZ); |
597 | if (size == -ENODATA || size == -EOPNOTSUPP) | 598 | if (size == -ENODATA || size == -EOPNOTSUPP) |