Whamcloud - gitweb
- landed b_hd_cray_merge3
[fs/lustre-release.git] / lustre / kernel_patches / patches / vfs_nointent-2.6-suse.patch
index 934dd77..cfd0db0 100644 (file)
@@ -47,22 +47,24 @@ Index: linux-2.6.5-12.1/fs/namei.c
        path_release(&nd);
  out:
        putname(tmp);
-@@ -1626,10 +1637,18 @@
+@@ -1626,10 +1637,20 @@
  
                struct dentry *dentry;
                struct nameidata nd;
-+                intent_init(&nd.intent, IT_LOOKUP);
++              intent_init(&nd.intent, IT_LOOKUP);
  
                error = path_lookup(tmp, LOOKUP_PARENT, &nd);
                if (error)
                        goto out;
-+              if (nd.dentry->d_inode->i_op->mkdir_raw) {
-+                      struct inode_operations *op = nd.dentry->d_inode->i_op;
-+                      error = op->mkdir_raw(&nd, mode);
-+                      /* the file system wants to use normal vfs path now */
-+                      if (error != -EOPNOTSUPP)
-+                              goto out2;
-+              }
++
++              if (nd.dentry->d_inode->i_op->mkdir_raw) {
++                      struct inode_operations *op = nd.dentry->d_inode->i_op;
++                      error = op->mkdir_raw(&nd, mode);
++                      /* the file system wants to use normal vfs path now */
++                      if (error != -EOPNOTSUPP)
++                              goto out2;
++              }
++
                dentry = lookup_create(&nd, 1);
                error = PTR_ERR(dentry);
                if (!IS_ERR(dentry)) {
@@ -78,22 +80,24 @@ Index: linux-2.6.5-12.1/fs/namei.c
        char * name;
        struct dentry *dentry;
        struct nameidata nd;
-+        intent_init(&nd.intent, IT_LOOKUP);
++      intent_init(&nd.intent, IT_LOOKUP);
  
        name = getname(pathname);
        if(IS_ERR(name))
-@@ -1744,6 +1765,14 @@
+@@ -1744,6 +1765,16 @@
                        error = -EBUSY;
                        goto exit1;
        }
-+      if (nd.dentry->d_inode->i_op->rmdir_raw) {
-+              struct inode_operations *op = nd.dentry->d_inode->i_op;
 +
-+              error = op->rmdir_raw(&nd);
-+              /* the file system wants to use normal vfs path now */
-+              if (error != -EOPNOTSUPP)
-+                      goto exit1;
-+      }
++      if (nd.dentry->d_inode->i_op->rmdir_raw) {
++              struct inode_operations *op = nd.dentry->d_inode->i_op;
++
++              error = op->rmdir_raw(&nd);
++              /* the file system wants to use normal vfs path now */
++              if (error != -EOPNOTSUPP)
++                      goto exit1;
++      }
++
        down(&nd.dentry->d_inode->i_sem);
        dentry = lookup_hash(&nd.last, nd.dentry);
        error = PTR_ERR(dentry);
@@ -101,7 +105,7 @@ Index: linux-2.6.5-12.1/fs/namei.c
        struct dentry *dentry;
        struct nameidata nd;
        struct inode *inode = NULL;
-+        intent_init(&nd.intent, IT_LOOKUP);
++      intent_init(&nd.intent, IT_LOOKUP);
  
        name = getname(pathname);
        if(IS_ERR(name))
@@ -109,13 +113,13 @@ Index: linux-2.6.5-12.1/fs/namei.c
        error = -EISDIR;
        if (nd.last_type != LAST_NORM)
                goto exit1;
-+      if (nd.dentry->d_inode->i_op->unlink_raw) {
-+              struct inode_operations *op = nd.dentry->d_inode->i_op;
-+              error = op->unlink_raw(&nd);
-+              /* the file system wants to use normal vfs path now */
-+              if (error != -EOPNOTSUPP)
-+                      goto exit1;
-+      }
++      if (nd.dentry->d_inode->i_op->unlink_raw) {
++              struct inode_operations *op = nd.dentry->d_inode->i_op;
++              error = op->unlink_raw(&nd);
++              /* the file system wants to use normal vfs path now */
++              if (error != -EOPNOTSUPP)
++                      goto exit1;
++      }
        down(&nd.dentry->d_inode->i_sem);
        dentry = lookup_hash(&nd.last, nd.dentry);
        error = PTR_ERR(dentry);
@@ -123,7 +127,7 @@ Index: linux-2.6.5-12.1/fs/namei.c
  
                struct dentry *dentry;
                struct nameidata nd;
-+                intent_init(&nd.intent, IT_LOOKUP);
++              intent_init(&nd.intent, IT_LOOKUP);
  
                error = path_lookup(to, LOOKUP_PARENT, &nd);
                if (error)
@@ -150,8 +154,8 @@ Index: linux-2.6.5-12.1/fs/namei.c
        struct nameidata nd, old_nd;
        int error;
        char * to;
-+        intent_init(&nd.intent, IT_LOOKUP);
-+        intent_init(&old_nd.intent, IT_LOOKUP);
++      intent_init(&nd.intent, IT_LOOKUP);
++      intent_init(&old_nd.intent, IT_LOOKUP);
  
        to = getname(newname);
        if (IS_ERR(to))
@@ -159,40 +163,22 @@ Index: linux-2.6.5-12.1/fs/namei.c
        error = -EXDEV;
        if (old_nd.mnt != nd.mnt)
                goto out_release;
-+        if (nd.dentry->d_inode->i_op->link_raw) {
-+                struct inode_operations *op = nd.dentry->d_inode->i_op;
-+                error = op->link_raw(&old_nd, &nd);
-+                /* the file system wants to use normal vfs path now */
-+                if (error != -EOPNOTSUPP)
-+                        goto out_release;
-+        }
++      if (nd.dentry->d_inode->i_op->link_raw) {
++              struct inode_operations *op = nd.dentry->d_inode->i_op;
++              error = op->link_raw(&old_nd, &nd);
++              /* the file system wants to use normal vfs path now */
++              if (error != -EOPNOTSUPP)
++                      goto out_release;
++      }
        new_dentry = lookup_create(&nd, 0);
        error = PTR_ERR(new_dentry);
        if (!IS_ERR(new_dentry)) {
-@@ -2038,7 +2093,7 @@
-  *       locking].
-  */
- int vfs_rename_dir(struct inode *old_dir, struct dentry *old_dentry,
--             struct inode *new_dir, struct dentry *new_dentry)
-+                   struct inode *new_dir, struct dentry *new_dentry)
- {
-       int error = 0;
-       struct inode *target;
-@@ -2083,7 +2138,7 @@
- }
- int vfs_rename_other(struct inode *old_dir, struct dentry *old_dentry,
--             struct inode *new_dir, struct dentry *new_dentry)
-+                     struct inode *new_dir, struct dentry *new_dentry)
- {
-       struct inode *target;
-       int error;
 @@ -2160,6 +2215,8 @@
        struct dentry * old_dentry, *new_dentry;
        struct dentry * trap;
        struct nameidata oldnd, newnd;
-+        intent_init(&oldnd.intent, IT_LOOKUP);
-+        intent_init(&newnd.intent, IT_LOOKUP);
++      intent_init(&oldnd.intent, IT_LOOKUP);
++      intent_init(&newnd.intent, IT_LOOKUP);
  
        error = path_lookup(oldname, LOOKUP_PARENT, &oldnd);
        if (error)
@@ -200,12 +186,12 @@ Index: linux-2.6.5-12.1/fs/namei.c
        if (newnd.last_type != LAST_NORM)
                goto exit2;
  
-+      if (old_dir->d_inode->i_op->rename_raw) {
-+              error = old_dir->d_inode->i_op->rename_raw(&oldnd, &newnd);
-+              /* the file system wants to use normal vfs path now */
-+              if (error != -EOPNOTSUPP)
-+                      goto exit2;
-+      }
++      if (old_dir->d_inode->i_op->rename_raw) {
++              error = old_dir->d_inode->i_op->rename_raw(&oldnd, &newnd);
++              /* the file system wants to use normal vfs path now */
++              if (error != -EOPNOTSUPP)
++                      goto exit2;
++      }
 +
        trap = lock_rename(new_dir, old_dir);
  
@@ -286,10 +272,10 @@ Index: linux-2.6.5-12.1/fs/open.c
 +              if (error != -EOPNOTSUPP)
 +                      goto dput_and_out;
 +      } else {
-+                down(&inode->i_sem);
-+                error = notify_change(nd.dentry, &newattrs);
-+                up(&inode->i_sem);
-+        }
++              down(&inode->i_sem);
++              error = notify_change(nd.dentry, &newattrs);
++              up(&inode->i_sem);
++      }
  dput_and_out:
        path_release(&nd);
  
@@ -425,14 +411,6 @@ Index: linux-2.6.5-12.1/fs/open.c
        if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
                goto out;
        newattrs.ia_valid =  ATTR_CTIME;
-@@ -723,6 +749,7 @@
-       }
-       if (!S_ISDIR(inode->i_mode))
-               newattrs.ia_valid |= ATTR_KILL_SUID|ATTR_KILL_SGID;
-+
-       down(&inode->i_sem);
-       error = notify_change(dentry, &newattrs);
-       up(&inode->i_sem);
 Index: linux-2.6.5-12.1/fs/exec.c
 ===================================================================
 --- linux-2.6.5-12.1.orig/fs/exec.c    2004-05-11 15:41:54.000000000 -0400