Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[linux-2.6-microblaze.git] / fs / overlayfs / namei.c
index 56b8d3a..a6162c4 100644 (file)
@@ -106,12 +106,12 @@ int ovl_check_fb_len(struct ovl_fb *fb, int fb_len)
 }
 
 static struct ovl_fh *ovl_get_fh(struct ovl_fs *ofs, struct dentry *dentry,
-                                const char *name)
+                                enum ovl_xattr ox)
 {
        int res, err;
        struct ovl_fh *fh = NULL;
 
-       res = ovl_do_getxattr(ofs, dentry, name, NULL, 0);
+       res = ovl_do_getxattr(ofs, dentry, ox, NULL, 0);
        if (res < 0) {
                if (res == -ENODATA || res == -EOPNOTSUPP)
                        return NULL;
@@ -125,7 +125,7 @@ static struct ovl_fh *ovl_get_fh(struct ovl_fs *ofs, struct dentry *dentry,
        if (!fh)
                return ERR_PTR(-ENOMEM);
 
-       res = ovl_do_getxattr(ofs, dentry, name, fh->buf, res);
+       res = ovl_do_getxattr(ofs, dentry, ox, fh->buf, res);
        if (res < 0)
                goto fail;
 
@@ -416,9 +416,9 @@ static int ovl_check_origin(struct ovl_fs *ofs, struct dentry *upperdentry,
  * Return 0 on match, -ESTALE on mismatch, < 0 on error.
  */
 static int ovl_verify_fh(struct ovl_fs *ofs, struct dentry *dentry,
-                        const char *name, const struct ovl_fh *fh)
+                        enum ovl_xattr ox, const struct ovl_fh *fh)
 {
-       struct ovl_fh *ofh = ovl_get_fh(ofs, dentry, name);
+       struct ovl_fh *ofh = ovl_get_fh(ofs, dentry, ox);
        int err = 0;
 
        if (!ofh)
@@ -443,7 +443,7 @@ static int ovl_verify_fh(struct ovl_fs *ofs, struct dentry *dentry,
  * Return 0 on match, -ESTALE on mismatch, -ENODATA on no xattr, < 0 on error.
  */
 int ovl_verify_set_fh(struct ovl_fs *ofs, struct dentry *dentry,
-                     const char *name, struct dentry *real, bool is_upper,
+                     enum ovl_xattr ox, struct dentry *real, bool is_upper,
                      bool set)
 {
        struct inode *inode;
@@ -457,9 +457,9 @@ int ovl_verify_set_fh(struct ovl_fs *ofs, struct dentry *dentry,
                goto fail;
        }
 
-       err = ovl_verify_fh(ofs, dentry, name, fh);
+       err = ovl_verify_fh(ofs, dentry, ox, fh);
        if (set && err == -ENODATA)
-               err = ovl_do_setxattr(ofs, dentry, name, fh->buf, fh->fb.len);
+               err = ovl_do_setxattr(ofs, dentry, ox, fh->buf, fh->fb.len);
        if (err)
                goto fail;