- merge revision 1.6
authorMark Huang <mlhuang@cs.princeton.edu>
Tue, 30 Nov 2004 16:40:31 +0000 (16:40 +0000)
committerMark Huang <mlhuang@cs.princeton.edu>
Tue, 30 Nov 2004 16:40:31 +0000 (16:40 +0000)
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

fs/ioctl.c

index 96a1b60..6404b0c 100644 (file)
@@ -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))