Whamcloud - gitweb
LU-12151 osd-ldiskfs: pass owner down rather than transfer it
[fs/lustre-release.git] / ldiskfs / kernel_patches / patches / rhel7 / ext4-osd-iop-common.patch
index 5f9f11c..b6a2908 100644 (file)
@@ -1,24 +1,25 @@
-Index: linux-3.10.0-123.13.2.el7.x86_64/fs/ext4/ext4.h
-===================================================================
---- linux-3.10.0-123.13.2.el7.x86_64.orig/fs/ext4/ext4.h
-+++ linux-3.10.0-123.13.2.el7.x86_64/fs/ext4/ext4.h
-@@ -2145,6 +2145,11 @@ extern int ext4_orphan_add(handle_t *, s
+diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
+index fa0f45ae..8f89024e 100644
+--- a/fs/ext4/ext4.h
++++ b/fs/ext4/ext4.h
+@@ -2239,6 +2239,12 @@ extern int ext4_orphan_add(handle_t *, struct inode *);
  extern int ext4_orphan_del(handle_t *, struct inode *);
  extern int ext4_htree_fill_tree(struct file *dir_file, __u32 start_hash,
                                __u32 start_minor_hash, __u32 *next_hash);
 +extern struct inode *ext4_create_inode(handle_t *handle,
-+                                     struct inode *dir, int mode);
++                                     struct inode *dir, int mode,
++                                     uid_t *owner);
 +extern int ext4_delete_entry(handle_t *handle, struct inode * dir,
 +                           struct ext4_dir_entry_2 *de_del,
 +                           struct buffer_head *bh);
  extern int search_dir(struct buffer_head *bh,
                      char *search_buf,
                      int buf_size,
-Index: linux-3.10.0-123.13.2.el7.x86_64/fs/ext4/namei.c
-===================================================================
---- linux-3.10.0-123.13.2.el7.x86_64.orig/fs/ext4/namei.c
-+++ linux-3.10.0-123.13.2.el7.x86_64/fs/ext4/namei.c
-@@ -2165,7 +2167,7 @@ int ext4_generic_delete_entry(handle_t *
+diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
+index 8e265e61..77d0782c 100644
+--- a/fs/ext4/namei.c
++++ b/fs/ext4/namei.c
+@@ -2176,7 +2176,7 @@ int ext4_generic_delete_entry(handle_t *handle,
        return -ENOENT;
  }
  
@@ -27,7 +28,7 @@ Index: linux-3.10.0-123.13.2.el7.x86_64/fs/ext4/namei.c
                             struct inode *dir,
                             struct ext4_dir_entry_2 *de_del,
                             struct buffer_head *bh)
-@@ -2206,7 +2208,7 @@ out:
+@@ -2216,7 +2216,7 @@ out:
                ext4_std_error(dir->i_sb, err);
        return err;
  }
@@ -36,17 +37,18 @@ Index: linux-3.10.0-123.13.2.el7.x86_64/fs/ext4/namei.c
  /*
   * DIR_NLINK feature is set if 1) nlinks > EXT4_LINK_MAX or 2) nlinks == 2,
   * since this indicates that nlinks count was previously 1.
-@@ -2253,6 +2255,28 @@ static int ext4_add_nondir(handle_t *han
+@@ -2263,6 +2263,29 @@ static int ext4_add_nondir(handle_t *handle,
        return err;
  }
  
 + /* Return locked inode, then the caller can modify the inode's states/flags
 +  * before others finding it. The caller should unlock the inode by itself. */
-+struct inode *ext4_create_inode(handle_t *handle, struct inode *dir, int mode)
++struct inode *ext4_create_inode(handle_t *handle, struct inode *dir, int mode,
++                              uid_t *owner)
 +{
 +      struct inode *inode;
 +
-+      inode = ext4_new_inode(handle, dir, mode, NULL, 0, NULL);
++      inode = ext4_new_inode(handle, dir, mode, NULL, 0, owner);
 +      if (!IS_ERR(inode)) {
 +              if (S_ISCHR(mode) || S_ISBLK(mode) || S_ISFIFO(mode)) {
 +#ifdef CONFIG_LDISKFS_FS_XATTR