summaryrefslogtreecommitdiffstats
path: root/features/unionfs/unionfs-use-proper-accessors-for-i_nlink.patch
diff options
context:
space:
mode:
Diffstat (limited to 'features/unionfs/unionfs-use-proper-accessors-for-i_nlink.patch')
-rw-r--r--features/unionfs/unionfs-use-proper-accessors-for-i_nlink.patch130
1 files changed, 0 insertions, 130 deletions
diff --git a/features/unionfs/unionfs-use-proper-accessors-for-i_nlink.patch b/features/unionfs/unionfs-use-proper-accessors-for-i_nlink.patch
deleted file mode 100644
index 937a93f6..00000000
--- a/features/unionfs/unionfs-use-proper-accessors-for-i_nlink.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-From 097ce909145fbf5998e12caa68c6641f15fc8718 Mon Sep 17 00:00:00 2001
-From: Bruce Ashfield <bruce.ashfield@windriver.com>
-Date: Fri, 27 Jan 2012 11:34:05 -0500
-Subject: [PATCH] unionfs: use proper accessors for i_nlink
-
-commit: a78ef704a8dd430225955f0709b22d4a6ba21deb changed the semantics
-for accessing i_nlink.
-
- Author: Miklos Szeredi <mszeredi@suse.cz>
- Date: Fri Oct 28 14:13:30 2011 +0200
-
- vfs: protect i_nlink
-
- Prevent direct modification of i_nlink by making it const and adding a
- non-const __i_nlink alias.
-
- Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
- Tested-by: Toshiyuki Okajima <toshi.okajima@jp.fujitsu.com>
- Signed-off-by: Christoph Hellwig <hch@lst.de>
-
-Updating unionfs to use the new accessor function.y
-
-Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
----
- fs/unionfs/inode.c | 12 ++++++------
- fs/unionfs/rename.c | 4 ++--
- fs/unionfs/subr.c | 2 +-
- fs/unionfs/unlink.c | 2 +-
- 4 files changed, 10 insertions(+), 10 deletions(-)
-
-diff --git a/fs/unionfs/inode.c b/fs/unionfs/inode.c
-index 83cb681..f016860 100644
---- a/fs/unionfs/inode.c
-+++ b/fs/unionfs/inode.c
-@@ -142,7 +142,7 @@ static int unionfs_create(struct inode *dir, struct dentry *dentry,
- fsstack_copy_inode_size(dir,
- lower_parent_dentry->d_inode);
- /* update no. of links on parent directory */
-- dir->i_nlink = unionfs_get_nlinks(dir);
-+ set_nlink(dir,unionfs_get_nlinks(dir));
- }
- }
-
-@@ -253,7 +253,7 @@ static int unionfs_link(struct dentry *old_dentry, struct inode *dir,
- lower_dir_dentry = dget_parent(lower_new_dentry);
- fsstack_copy_attr_times(dir, lower_dir_dentry->d_inode);
- dput(lower_dir_dentry);
-- dir->i_nlink = unionfs_get_nlinks(dir);
-+ set_nlink(dir,unionfs_get_nlinks(dir));
- err = 0;
- }
- if (err)
-@@ -328,7 +328,7 @@ check_link:
- fsstack_copy_inode_size(dir, lower_new_dentry->d_parent->d_inode);
-
- /* propagate number of hard-links */
-- old_dentry->d_inode->i_nlink = unionfs_get_nlinks(old_dentry->d_inode);
-+ set_nlink(old_dentry->d_inode,unionfs_get_nlinks(old_dentry->d_inode));
- /* new dentry's ctime may have changed due to hard-link counts */
- unionfs_copy_attr_times(new_dentry->d_inode);
-
-@@ -402,7 +402,7 @@ static int unionfs_symlink(struct inode *dir, struct dentry *dentry,
- fsstack_copy_inode_size(dir,
- lower_parent_dentry->d_inode);
- /* update no. of links on parent directory */
-- dir->i_nlink = unionfs_get_nlinks(dir);
-+ set_nlink(dir,unionfs_get_nlinks(dir));
- }
- }
-
-@@ -514,7 +514,7 @@ static int unionfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
- lower_parent_dentry->d_inode);
-
- /* update number of links on parent directory */
-- dir->i_nlink = unionfs_get_nlinks(dir);
-+ set_nlink(dir,unionfs_get_nlinks(dir));
- }
-
- err = make_dir_opaque(dentry, dbstart(dentry));
-@@ -594,7 +594,7 @@ static int unionfs_mknod(struct inode *dir, struct dentry *dentry, int mode,
- fsstack_copy_inode_size(dir,
- lower_parent_dentry->d_inode);
- /* update no. of links on parent directory */
-- dir->i_nlink = unionfs_get_nlinks(dir);
-+ set_nlink(dir,unionfs_get_nlinks(dir));
- }
- }
-
-diff --git a/fs/unionfs/rename.c b/fs/unionfs/rename.c
-index c8ab910..ce85b84 100644
---- a/fs/unionfs/rename.c
-+++ b/fs/unionfs/rename.c
-@@ -212,8 +212,8 @@ static int do_unionfs_rename(struct inode *old_dir,
- fsstack_copy_attr_times(new_parent->d_inode,
- unlink_dir_dentry->d_inode);
- /* propagate number of hard-links */
-- new_parent->d_inode->i_nlink =
-- unionfs_get_nlinks(new_parent->d_inode);
-+ set_nlink(new_parent->d_inode,
-+ unionfs_get_nlinks(new_parent->d_inode));
-
- unlock_dir(unlink_dir_dentry);
- if (!err) {
-diff --git a/fs/unionfs/subr.c b/fs/unionfs/subr.c
-index bdca2f7..9dad537 100644
---- a/fs/unionfs/subr.c
-+++ b/fs/unionfs/subr.c
-@@ -91,5 +91,5 @@ void unionfs_copy_attr_all(struct inode *dest,
- * Update the nlinks AFTER updating the above fields, because the
- * get_links callback may depend on them.
- */
-- dest->i_nlink = unionfs_get_nlinks(dest);
-+ set_nlink(dest,unionfs_get_nlinks(dest));
- }
-diff --git a/fs/unionfs/unlink.c b/fs/unionfs/unlink.c
-index bf447bb..b607ba3 100644
---- a/fs/unionfs/unlink.c
-+++ b/fs/unionfs/unlink.c
-@@ -190,7 +190,7 @@ static int unionfs_rmdir_first(struct inode *dir, struct dentry *dentry,
-
- fsstack_copy_attr_times(dir, lower_dir_dentry->d_inode);
- /* propagate number of hard-links */
-- dentry->d_inode->i_nlink = unionfs_get_nlinks(dentry->d_inode);
-+ set_nlink(dentry->d_inode,unionfs_get_nlinks(dentry->d_inode));
-
- out:
- if (lower_dir_dentry)
---
-1.7.4.1
-