summaryrefslogtreecommitdiff
path: root/target/linux/generic/patches-3.12/506-yaffs-3.2-dont-use-i_nlink-directly.patch
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-12-16 07:51:19 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-12-16 07:51:19 +0000
commit1750e3ed7f2bcc34ec7276f60efe94392515f564 (patch)
treec3baa813b2d49c1e5302c7561a89be81af5b3fe0 /target/linux/generic/patches-3.12/506-yaffs-3.2-dont-use-i_nlink-directly.patch
parente9d74a53cfa01272a460682c604ee09d21b90da6 (diff)
kernel: update yaffs code
Use the latest version of the yaffs code. Fetched from the yaffs2 git tree and it is based on the following commit: commit bc76682d93955cfb33051beb503ad9f8a5450578 Merge: 3a8580e ffa781d Author: Charles Manning <cdhmanning@gmail.com> Date: Thu Jul 11 17:46:25 2013 +1200 Merge branch 'master' of ssh://www.aleph1.co.uk/home/aleph1/git/yaffs2 Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39084 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/patches-3.12/506-yaffs-3.2-dont-use-i_nlink-directly.patch')
-rw-r--r--target/linux/generic/patches-3.12/506-yaffs-3.2-dont-use-i_nlink-directly.patch78
1 files changed, 0 insertions, 78 deletions
diff --git a/target/linux/generic/patches-3.12/506-yaffs-3.2-dont-use-i_nlink-directly.patch b/target/linux/generic/patches-3.12/506-yaffs-3.2-dont-use-i_nlink-directly.patch
deleted file mode 100644
index 91e8281196..0000000000
--- a/target/linux/generic/patches-3.12/506-yaffs-3.2-dont-use-i_nlink-directly.patch
+++ /dev/null
@@ -1,78 +0,0 @@
---- a/fs/yaffs2/yaffs_vfs_glue.c
-+++ b/fs/yaffs2/yaffs_vfs_glue.c
-@@ -220,6 +220,29 @@ static struct inode *yaffs_iget(struct s
- #define yaffs_SuperToDevice(sb) ((yaffs_dev_t *)sb->u.generic_sbp)
- #endif
-
-+#if (LINUX_VERSION_CODE > KERNEL_VERSION(3, 2, 0))
-+static inline void yaffs_set_nlink(struct inode *inode, unsigned int nlink)
-+{
-+ set_nlink(inode, nlink);
-+}
-+
-+static inline void yaffs_dec_link_count(struct inode *inode)
-+{
-+ inode_dec_link_count(inode);
-+}
-+#else
-+static inline void yaffs_set_nlink(struct inode *inode, unsigned int nlink)
-+{
-+ inode->i_nlink = nlink;
-+}
-+
-+static inline void yaffs_dec_link_count(struct inode *inode)
-+{
-+ inode->i_nlink--;
-+ mark_inode_dirty(inode)
-+}
-+#endif
-+
-
- #define update_dir_time(dir) do {\
- (dir)->i_ctime = (dir)->i_mtime = CURRENT_TIME; \
-@@ -1362,7 +1385,7 @@ static void yaffs_fill_inode_from_obj(st
- inode->i_size = yaffs_get_obj_length(obj);
- inode->i_blocks = (inode->i_size + 511) >> 9;
-
-- inode->i_nlink = yaffs_get_obj_link_count(obj);
-+ yaffs_set_nlink(inode, yaffs_get_obj_link_count(obj));
-
- T(YAFFS_TRACE_OS,
- (TSTR("yaffs_fill_inode mode %x uid %d gid %d size %d count %d\n"),
-@@ -1784,10 +1807,9 @@ static int yaffs_unlink(struct inode *di
- retVal = yaffs_unlinker(obj, dentry->d_name.name);
-
- if (retVal == YAFFS_OK) {
-- dentry->d_inode->i_nlink--;
-+ yaffs_dec_link_count(dentry->d_inode);
- dir->i_version++;
- yaffs_gross_unlock(dev);
-- mark_inode_dirty(dentry->d_inode);
- update_dir_time(dir);
- return 0;
- }
-@@ -1818,7 +1840,8 @@ static int yaffs_link(struct dentry *old
- obj);
-
- if (link) {
-- old_dentry->d_inode->i_nlink = yaffs_get_obj_link_count(obj);
-+ yaffs_set_nlink(old_dentry->d_inode,
-+ yaffs_get_obj_link_count(obj));
- d_instantiate(dentry, old_dentry->d_inode);
- atomic_inc(&old_dentry->d_inode->i_count);
- T(YAFFS_TRACE_OS,
-@@ -1937,11 +1960,9 @@ static int yaffs_rename(struct inode *ol
- yaffs_gross_unlock(dev);
-
- if (retVal == YAFFS_OK) {
-- if (target) {
-- new_dentry->d_inode->i_nlink--;
-- mark_inode_dirty(new_dentry->d_inode);
-- }
--
-+ if (target)
-+ yaffs_dec_link_count(new_dentry->d_inode);
-+
- update_dir_time(old_dir);
- if(old_dir != new_dir)
- update_dir_time(new_dir);