b7638c05cd4e3e5c218f21eaf6d0c00057a6511f
[openwrt.git] / target / linux / generic / patches-2.6.37 / 210-overlayfs_2.6.37_backport.patch
1 --- a/fs/overlayfs/overlayfs.c
2 +++ b/fs/overlayfs/overlayfs.c
3 @@ -28,13 +28,8 @@ struct ovl_fs {
4 struct ovl_entry {
5 struct dentry *__upperdentry;
6 struct dentry *lowerdentry;
7 - union {
8 - struct {
9 - u64 version;
10 - bool opaque;
11 - };
12 - struct rcu_head rcu;
13 - };
14 + u64 version;
15 + bool opaque;
16 };
17
18 static const char *ovl_whiteout_xattr = "trusted.overlay.whiteout";
19 @@ -632,12 +627,6 @@ static const struct file_operations ovl_
20
21 static const struct inode_operations ovl_dir_inode_operations;
22
23 -static void ovl_entry_free(struct rcu_head *head)
24 -{
25 - struct ovl_entry *oe = container_of(head, struct ovl_entry, rcu);
26 - kfree(oe);
27 -}
28 -
29 static void ovl_dentry_release(struct dentry *dentry)
30 {
31 struct ovl_entry *oe = dentry->d_fsdata;
32 @@ -645,7 +634,7 @@ static void ovl_dentry_release(struct de
33 if (oe) {
34 dput(oe->__upperdentry);
35 dput(oe->lowerdentry);
36 - call_rcu(&oe->rcu, ovl_entry_free);
37 + kfree(oe);
38 }
39 }
40
41 @@ -1338,7 +1327,7 @@ static int ovl_dir_getattr(struct vfsmou
42 return 0;
43 }
44
45 -static int ovl_permission(struct inode *inode, int mask, unsigned int flags)
46 +static int ovl_permission(struct inode *inode, int mask)
47 {
48 struct ovl_entry *oe;
49 struct dentry *alias = NULL;
50 @@ -1349,8 +1338,6 @@ static int ovl_permission(struct inode *
51
52 if (S_ISDIR(inode->i_mode)) {
53 oe = inode->i_private;
54 - } else if (flags & IPERM_FLAG_RCU) {
55 - return -ECHILD;
56 } else {
57 /*
58 * For non-directories find an alias and get the info
59 @@ -1377,7 +1364,6 @@ static int ovl_permission(struct inode *
60 /* Careful in RCU walk mode */
61 realinode = ACCESS_ONCE(realdentry->d_inode);
62 if (!realinode) {
63 - WARN_ON(!(flags & IPERM_FLAG_RCU));
64 return -ENOENT;
65 }
66
67 @@ -1402,9 +1388,9 @@ static int ovl_permission(struct inode *
68 }
69
70 if (realinode->i_op->permission)
71 - err = realinode->i_op->permission(realinode, mask, flags);
72 + err = realinode->i_op->permission(realinode, mask);
73 else
74 - err = generic_permission(realinode, mask, flags,
75 + err = generic_permission(realinode, mask,
76 realinode->i_op->check_acl);
77 out_dput:
78 dput(alias);
This page took 0.039616 seconds and 3 git commands to generate.