X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=fs%2Fioctl.c;h=8c628a8d4a156c0203df1c7b01301f4e9dbc3b74;hb=15c47ccdc31c6327d745eee1d8597f9886441430;hp=5ace7efb0d04d2c0d4201e0fa24176be43b6e69c;hpb=5a787756b809888e8925d722862167f1229b58f7;p=mirror_ubuntu-bionic-kernel.git diff --git a/fs/ioctl.c b/fs/ioctl.c index 5ace7efb0d04..8c628a8d4a15 100644 --- a/fs/ioctl.c +++ b/fs/ioctl.c @@ -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 */