diff options
Diffstat (limited to 'target/linux/generic/patches-2.6.37/101-overlayfs_2.6.37_backport.patch')
-rw-r--r-- | target/linux/generic/patches-2.6.37/101-overlayfs_2.6.37_backport.patch | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/target/linux/generic/patches-2.6.37/101-overlayfs_2.6.37_backport.patch b/target/linux/generic/patches-2.6.37/101-overlayfs_2.6.37_backport.patch new file mode 100644 index 0000000000..b7638c05cd --- /dev/null +++ b/target/linux/generic/patches-2.6.37/101-overlayfs_2.6.37_backport.patch @@ -0,0 +1,78 @@ +--- a/fs/overlayfs/overlayfs.c ++++ b/fs/overlayfs/overlayfs.c +@@ -28,13 +28,8 @@ struct ovl_fs { + struct ovl_entry { + struct dentry *__upperdentry; + struct dentry *lowerdentry; +- union { +- struct { +- u64 version; +- bool opaque; +- }; +- struct rcu_head rcu; +- }; ++ u64 version; ++ bool opaque; + }; + + static const char *ovl_whiteout_xattr = "trusted.overlay.whiteout"; +@@ -632,12 +627,6 @@ static const struct file_operations ovl_ + + static const struct inode_operations ovl_dir_inode_operations; + +-static void ovl_entry_free(struct rcu_head *head) +-{ +- struct ovl_entry *oe = container_of(head, struct ovl_entry, rcu); +- kfree(oe); +-} +- + static void ovl_dentry_release(struct dentry *dentry) + { + struct ovl_entry *oe = dentry->d_fsdata; +@@ -645,7 +634,7 @@ static void ovl_dentry_release(struct de + if (oe) { + dput(oe->__upperdentry); + dput(oe->lowerdentry); +- call_rcu(&oe->rcu, ovl_entry_free); ++ kfree(oe); + } + } + +@@ -1338,7 +1327,7 @@ static int ovl_dir_getattr(struct vfsmou + return 0; + } + +-static int ovl_permission(struct inode *inode, int mask, unsigned int flags) ++static int ovl_permission(struct inode *inode, int mask) + { + struct ovl_entry *oe; + struct dentry *alias = NULL; +@@ -1349,8 +1338,6 @@ static int ovl_permission(struct inode * + + if (S_ISDIR(inode->i_mode)) { + oe = inode->i_private; +- } else if (flags & IPERM_FLAG_RCU) { +- return -ECHILD; + } else { + /* + * For non-directories find an alias and get the info +@@ -1377,7 +1364,6 @@ static int ovl_permission(struct inode * + /* Careful in RCU walk mode */ + realinode = ACCESS_ONCE(realdentry->d_inode); + if (!realinode) { +- WARN_ON(!(flags & IPERM_FLAG_RCU)); + return -ENOENT; + } + +@@ -1402,9 +1388,9 @@ static int ovl_permission(struct inode * + } + + if (realinode->i_op->permission) +- err = realinode->i_op->permission(realinode, mask, flags); ++ err = realinode->i_op->permission(realinode, mask); + else +- err = generic_permission(realinode, mask, flags, ++ err = generic_permission(realinode, mask, + realinode->i_op->check_acl); + out_dput: + dput(alias); |