From: Mark Huang Date: Tue, 30 Nov 2004 16:40:31 +0000 (+0000) Subject: - merge revision 1.6 X-Git-Tag: after-CAN_2004_1016_1017_1068-merge~20 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=64aafc6d2d354b62ba4d3b2f794881e8b14e8764;p=linux-2.6.git - merge revision 1.6 date: 2004/11/18 20:06:31; author: smuir; state: Exp; lines: +13 -0 Need a way to manipulate vserver file attrs using a file descriptor --- diff --git a/fs/ioctl.c b/fs/ioctl.c index 96a1b601e..6404b0c10 100644 --- a/fs/ioctl.c +++ b/fs/ioctl.c @@ -173,6 +173,19 @@ asmlinkage long sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg) error = vx_proc_ioctl(filp->f_dentry->d_inode, filp, cmd, arg); break; #endif + case FIOC_SETIATTR: + case FIOC_GETIATTR: + /* + * Verify that this filp is a file object, + * not (say) a socket. + */ + error = -ENOTTY; + if (S_ISREG(filp->f_dentry->d_inode->i_mode) || + S_ISDIR(filp->f_dentry->d_inode->i_mode)) + error = vc_iattr_ioctl(filp->f_dentry, + cmd, arg); + break; + default: error = -ENOTTY; if (S_ISREG(filp->f_dentry->d_inode->i_mode))