aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ncpfs/ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ncpfs/ioctl.c')
-rw-r--r--fs/ncpfs/ioctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ncpfs/ioctl.c b/fs/ncpfs/ioctl.c
index d44318d27504..60426ccb3b65 100644
--- a/fs/ncpfs/ioctl.c
+++ b/fs/ncpfs/ioctl.c
@@ -811,7 +811,7 @@ outrel:
811 811
812long ncp_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) 812long ncp_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
813{ 813{
814 struct inode *inode = filp->f_dentry->d_inode; 814 struct inode *inode = file_inode(filp);
815 struct ncp_server *server = NCP_SERVER(inode); 815 struct ncp_server *server = NCP_SERVER(inode);
816 kuid_t uid = current_uid(); 816 kuid_t uid = current_uid();
817 int need_drop_write = 0; 817 int need_drop_write = 0;
@@ -822,7 +822,7 @@ long ncp_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
822 case NCP_IOC_CONN_LOGGED_IN: 822 case NCP_IOC_CONN_LOGGED_IN:
823 case NCP_IOC_SETROOT: 823 case NCP_IOC_SETROOT:
824 if (!capable(CAP_SYS_ADMIN)) { 824 if (!capable(CAP_SYS_ADMIN)) {
825 ret = -EACCES; 825 ret = -EPERM;
826 goto out; 826 goto out;
827 } 827 }
828 break; 828 break;