1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-25 21:44:37 +02:00
openwrt-xburst/target/linux/generic/patches-2.6.37/101-overlayfs_2.6.37_backport.patch
nbd 4d4c41d673 kernel: reorganize 2.6.37 patches
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26692 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-04-16 18:31:21 +00:00

79 lines
2.0 KiB
Diff

--- 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);