]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/ioctl.c
s390/crypto: Fix return code checking in cbc_paes_crypt()
[mirror_ubuntu-bionic-kernel.git] / fs / ioctl.c
index 5ace7efb0d04d2c0d4201e0fa24176be43b6e69c..8c628a8d4a156c0203df1c7b01301f4e9dbc3b74 100644 (file)
@@ -549,7 +549,7 @@ static int ioctl_fsfreeze(struct file *filp)
 {
        struct super_block *sb = file_inode(filp)->i_sb;
 
-       if (!capable(CAP_SYS_ADMIN))
+       if (!ns_capable(sb->s_user_ns, CAP_SYS_ADMIN))
                return -EPERM;
 
        /* If filesystem doesn't support freeze feature, return. */
@@ -566,7 +566,7 @@ static int ioctl_fsthaw(struct file *filp)
 {
        struct super_block *sb = file_inode(filp)->i_sb;
 
-       if (!capable(CAP_SYS_ADMIN))
+       if (!ns_capable(sb->s_user_ns, CAP_SYS_ADMIN))
                return -EPERM;
 
        /* Thaw */