struct dentry *dentry, *hidden_dentry;
dentry = file->f_dentry;
- lock_dentry(dentry);
+ unionfs_lock_dentry(dentry);
if ((err = unionfs_partial_lookup(dentry)))
goto out;
bstart = dbstart(dentry);
err = -EFAULT;
out:
- unlock_dentry(dentry);
+ unionfs_unlock_dentry(dentry);
return err < 0 ? err : bend;
}
int err;
struct dentry *tmp_dentry = NULL;
- struct dentry *hidden_dentry = NULL;
+ struct dentry *hidden_dentry;
struct dentry *hidden_dir_dentry = NULL;
hidden_dentry = unionfs_lower_dentry_idx(dentry, bstart);
int err = 0;
dentry = file->f_dentry;
- lock_dentry(dentry);
+ unionfs_lock_dentry(dentry);
sb = dentry->d_sb;
unionfs_read_lock(sb);
if (!unionfs_d_revalidate(dentry, NULL) && !d_deleted(dentry)) {
}
out:
- unlock_dentry(dentry);
+ unionfs_unlock_dentry(dentry);
unionfs_read_unlock(dentry->d_sb);
return err;
}
}
dentry = file->f_dentry;
- lock_dentry(dentry);
+ unionfs_lock_dentry(dentry);
unionfs_read_lock(inode->i_sb);
bstart = fbstart(file) = dbstart(dentry);
}
}
- unlock_dentry(dentry);
+ unionfs_unlock_dentry(dentry);
unionfs_read_unlock(inode->i_sb);
out:
/* check if asked for local commands */
switch (cmd) {
- case UNIONFS_IOCTL_INCGEN:
- /* Increment the superblock generation count */
- err = -EACCES;
- if (!capable(CAP_SYS_ADMIN))
- goto out;
- err = unionfs_ioctl_incgen(file, cmd, arg);
- break;
-
- case UNIONFS_IOCTL_QUERYFILE:
- /* Return list of branches containing the given file */
- err = unionfs_ioctl_queryfile(file, cmd, arg);
- break;
-
- default:
- /* pass the ioctl down */
- err = do_ioctl(file, cmd, arg);
- break;
+ case UNIONFS_IOCTL_INCGEN:
+ /* Increment the superblock generation count */
+ err = -EACCES;
+ if (!capable(CAP_SYS_ADMIN))
+ goto out;
+ err = unionfs_ioctl_incgen(file, cmd, arg);
+ break;
+
+ case UNIONFS_IOCTL_QUERYFILE:
+ /* Return list of branches containing the given file */
+ err = unionfs_ioctl_queryfile(file, cmd, arg);
+ break;
+
+ default:
+ /* pass the ioctl down */
+ err = do_ioctl(file, cmd, arg);
+ break;
}
out:
if (!atomic_dec_and_test(&UNIONFS_I(dentry->d_inode)->totalopens))
goto out;
- lock_dentry(dentry);
+ unionfs_lock_dentry(dentry);
bstart = fbstart(file);
bend = fbend(file);
}
out_lock:
- unlock_dentry(dentry);
+ unionfs_unlock_dentry(dentry);
out:
return err;
}
struct dentry *dentry,
const char *name, int bindex);
+/* For detailed explanation of copyup see:
+ * Documentation/filesystems/unionfs/concepts.txt
+ */
+
#ifdef CONFIG_UNION_FS_XATTR
/* copyup all extended attrs for a given dentry */
static int copyup_xattrs(struct dentry *old_hidden_dentry,
/* find the parent directory dentry in unionfs */
parent_dentry = child_dentry->d_parent;
- lock_dentry(parent_dentry);
+ unionfs_lock_dentry(parent_dentry);
/* find out the hidden_parent_dentry in the given branch */
hidden_parent_dentry = unionfs_lower_dentry_idx(parent_dentry, bindex);
while (1) {
/* get hidden parent dir in the current branch */
hidden_parent_dentry = unionfs_lower_dentry_idx(parent_dentry, bindex);
- unlock_dentry(parent_dentry);
+ unionfs_unlock_dentry(parent_dentry);
/* init the values to lookup */
childname = child_dentry->d_name.name;
{
int err;
- lock_dentry(dentry);
+ unionfs_lock_dentry(dentry);
err = unionfs_d_revalidate(dentry, nd);
- unlock_dentry(dentry);
+ unionfs_unlock_dentry(dentry);
return err;
}
* reference, but the printing functions verify that we have a lock
* on the dentry before calling dbstart, etc.
*/
- lock_dentry(dentry);
+ unionfs_lock_dentry(dentry);
/* this could be a negative dentry, so check first */
if (!UNIONFS_D(dentry)) {
return dent->d_fsdata;
}
-#define dbstart(dent) (UNIONFS_D(dent)->bstart)
-#define set_dbstart(dent, val) do { UNIONFS_D(dent)->bstart = val; } while(0)
-#define dbend(dent) (UNIONFS_D(dent)->bend)
-#define set_dbend(dent, val) do { UNIONFS_D(dent)->bend = val; } while(0)
-#define dbopaque(dent) (UNIONFS_D(dent)->bopaque)
-#define set_dbopaque(dent, val) do { UNIONFS_D(dent)->bopaque = val; } while (0)
+static inline int dbstart(const struct dentry *dent)
+{
+ return UNIONFS_D(dent)->bstart;
+}
+
+static inline void set_dbstart(struct dentry *dent, int val)
+{
+ UNIONFS_D(dent)->bstart = val;
+}
+
+static inline int dbend(const struct dentry *dent)
+{
+ return UNIONFS_D(dent)->bend;
+}
+
+static inline void set_dbend(struct dentry *dent, int val)
+{
+ UNIONFS_D(dent)->bend = val;
+}
+
+static inline int dbopaque(const struct dentry *dent)
+{
+ return UNIONFS_D(dent)->bopaque;
+}
+
+static inline void set_dbopaque(struct dentry *dent, int val)
+{
+ UNIONFS_D(dent)->bopaque = val;
+}
static inline void unionfs_set_lower_dentry_idx(struct dentry *dent, int index,
struct dentry *val)
}
/* Macros for locking a dentry. */
-#define lock_dentry(d) down(&UNIONFS_D(d)->sem)
-#define unlock_dentry(d) up(&UNIONFS_D(d)->sem)
-#define verify_locked(d)
+static inline void unionfs_lock_dentry(struct dentry *d)
+{
+ mutex_lock(&UNIONFS_D(d)->lock);
+}
+
+static inline void unionfs_unlock_dentry(struct dentry *d)
+{
+ mutex_unlock(&UNIONFS_D(d)->lock);
+}
+
+static inline void verify_locked(struct dentry *d)
+{
+}
#endif /* _FANOUT_H */
int bindex = 0, bstart;
char *name = NULL;
- lock_dentry(dentry);
+ unionfs_lock_dentry(dentry);
/* We start out in the leftmost branch. */
bstart = dbstart(dentry);
dput(wh_dentry);
kfree(name);
- unlock_dentry(dentry);
+ unionfs_unlock_dentry(dentry);
return err;
}
kfree(name);
- unlock_dentry(new_dentry);
- unlock_dentry(old_dentry);
+ unionfs_unlock_dentry(new_dentry);
+ unionfs_unlock_dentry(old_dentry);
return err;
}
int bindex = 0, bstart;
char *name = NULL;
- lock_dentry(dentry);
+ unionfs_lock_dentry(dentry);
/* We start out in the leftmost branch. */
bstart = dbstart(dentry);
d_drop(dentry);
kfree(name);
- unlock_dentry(dentry);
+ unionfs_unlock_dentry(dentry);
return err;
}
int whiteout_unlinked = 0;
struct sioq_args args;
- lock_dentry(dentry);
+ unionfs_lock_dentry(dentry);
bstart = dbstart(dentry);
hidden_dentry = unionfs_lower_dentry(dentry);
kfree(name);
- unlock_dentry(dentry);
+ unionfs_unlock_dentry(dentry);
return err;
}
char *name = NULL;
int whiteout_unlinked = 0;
- lock_dentry(dentry);
+ unionfs_lock_dentry(dentry);
bstart = dbstart(dentry);
hidden_dentry = unionfs_lower_dentry(dentry);
kfree(name);
- unlock_dentry(dentry);
+ unionfs_unlock_dentry(dentry);
return err;
}
int err;
struct dentry *hidden_dentry;
- lock_dentry(dentry);
+ unionfs_lock_dentry(dentry);
hidden_dentry = unionfs_lower_dentry(dentry);
if (!hidden_dentry->d_inode->i_op ||
fsstack_copy_attr_atime(dentry->d_inode, hidden_dentry->d_inode);
out:
- unlock_dentry(dentry);
+ unionfs_unlock_dentry(dentry);
return err;
}
int i;
int copyup = 0;
- lock_dentry(dentry);
+ unionfs_lock_dentry(dentry);
bstart = dbstart(dentry);
bend = dbend(dentry);
inode = dentry->d_inode;
fsstack_copy_inode_size(inode, hidden_inode);
out:
- unlock_dentry(dentry);
+ unionfs_unlock_dentry(dentry);
return err;
}
#include "union.h"
-static int is_opaque_dir(struct dentry *dentry, int bindex);
-static int is_validname(const char *name);
+/* is the filename valid == !(whiteout for a file or opaque dir marker) */
+static int is_validname(const char *name)
+{
+ if (!strncmp(name, UNIONFS_WHPFX, UNIONFS_WHLEN))
+ return 0;
+ if (!strncmp(name, UNIONFS_DIR_OPAQUE_NAME,
+ sizeof(UNIONFS_DIR_OPAQUE_NAME) - 1))
+ return 0;
+ return 1;
+}
+
+/* The rest of these are utility functions for lookup. */
+static int is_opaque_dir(struct dentry *dentry, int bindex)
+{
+ int err = 0;
+ struct dentry *hidden_dentry;
+ struct dentry *wh_hidden_dentry;
+ struct inode *hidden_inode;
+ struct sioq_args args;
+
+ hidden_dentry = unionfs_lower_dentry_idx(dentry, bindex);
+ hidden_inode = hidden_dentry->d_inode;
+
+ BUG_ON(!S_ISDIR(hidden_inode->i_mode));
+
+ mutex_lock(&hidden_inode->i_mutex);
+
+ if (!permission(hidden_inode, MAY_EXEC, NULL))
+ wh_hidden_dentry = lookup_one_len(UNIONFS_DIR_OPAQUE, hidden_dentry,
+ sizeof(UNIONFS_DIR_OPAQUE) - 1);
+ else {
+ args.is_opaque.dentry = hidden_dentry;
+ run_sioq(__is_opaque_dir, &args);
+ wh_hidden_dentry = args.ret;
+ }
+
+ mutex_unlock(&hidden_inode->i_mutex);
+
+ if (IS_ERR(wh_hidden_dentry)) {
+ err = PTR_ERR(wh_hidden_dentry);
+ goto out;
+ }
+
+ /* This is an opaque dir iff wh_hidden_dentry is positive */
+ err = !!wh_hidden_dentry->d_inode;
+
+ dput(wh_hidden_dentry);
+out:
+ return err;
+}
struct dentry *unionfs_lookup_backend(struct dentry *dentry, struct nameidata *nd,
int lookupmode)
parent_dentry = dget_parent(dentry);
/* We never partial lookup the root directory. */
if (parent_dentry != dentry) {
- lock_dentry(parent_dentry);
+ unionfs_lock_dentry(parent_dentry);
locked_parent = 1;
} else {
dput(parent_dentry);
}
kfree(whname);
if (locked_parent)
- unlock_dentry(parent_dentry);
+ unionfs_unlock_dentry(parent_dentry);
dput(parent_dentry);
if (locked_child)
- unlock_dentry(dentry);
+ unionfs_unlock_dentry(dentry);
return ERR_PTR(err);
}
return -ENOSYS;
}
-/* The rest of these are utility functions for lookup. */
-static int is_opaque_dir(struct dentry *dentry, int bindex)
-{
- int err = 0;
- struct dentry *hidden_dentry;
- struct dentry *wh_hidden_dentry;
- struct inode *hidden_inode;
- struct sioq_args args;
-
- hidden_dentry = unionfs_lower_dentry_idx(dentry, bindex);
- hidden_inode = hidden_dentry->d_inode;
-
- BUG_ON(!S_ISDIR(hidden_inode->i_mode));
-
- mutex_lock(&hidden_inode->i_mutex);
-
- if (!permission(hidden_inode, MAY_EXEC, NULL))
- wh_hidden_dentry = lookup_one_len(UNIONFS_DIR_OPAQUE, hidden_dentry,
- sizeof(UNIONFS_DIR_OPAQUE) - 1);
- else {
- args.is_opaque.dentry = hidden_dentry;
- run_sioq(__is_opaque_dir, &args);
- wh_hidden_dentry = args.ret;
- }
-
- mutex_unlock(&hidden_inode->i_mutex);
-
- if (IS_ERR(wh_hidden_dentry)) {
- err = PTR_ERR(wh_hidden_dentry);
- goto out;
- }
-
- /* This is an opaque dir iff wh_hidden_dentry is positive */
- err = !!wh_hidden_dentry->d_inode;
-
- dput(wh_hidden_dentry);
-out:
- return err;
-}
-
-/* is the filename valid == !(whiteout for a file or opaque dir marker) */
-static int is_validname(const char *name)
-{
- if (!strncmp(name, UNIONFS_WHPFX, UNIONFS_WHLEN))
- return 0;
- if (!strncmp(name, UNIONFS_DIR_OPAQUE_NAME,
- sizeof(UNIONFS_DIR_OPAQUE_NAME) - 1))
- return 0;
- return 1;
-}
-
/* The dentry cache is just so we have properly sized dentries. */
static struct kmem_cache *unionfs_dentry_cachep;
int unionfs_init_dentry_cache(void)
if (!info)
goto out;
- init_MUTEX_LOCKED(&info->sem);
+
+ mutex_init(&info->lock);
+ mutex_lock(&info->lock);
info->lower_paths = NULL;
} else
skip:
/* only (our) lookup wants to do a d_add */
switch (flag) {
- case INTERPOSE_DEFAULT:
- case INTERPOSE_REVAL_NEG:
- d_instantiate(dentry, inode);
- break;
- case INTERPOSE_LOOKUP:
- err = PTR_ERR(d_splice_alias(inode, dentry));
- break;
- case INTERPOSE_REVAL:
- /* Do nothing. */
- break;
- default:
- printk(KERN_ERR "Invalid interpose flag passed!");
- BUG();
+ case INTERPOSE_DEFAULT:
+ case INTERPOSE_REVAL_NEG:
+ d_instantiate(dentry, inode);
+ break;
+ case INTERPOSE_LOOKUP:
+ err = PTR_ERR(d_splice_alias(inode, dentry));
+ break;
+ case INTERPOSE_REVAL:
+ /* Do nothing. */
+ break;
+ default:
+ printk(KERN_ERR "Invalid interpose flag passed!");
+ BUG();
}
mutex_unlock(&inode->i_mutex);
/* call interpose to create the upper level inode */
if ((err = unionfs_interpose(sb->s_root, sb, 0)))
goto out_freedpd;
- unlock_dentry(sb->s_root);
+ unionfs_unlock_dentry(sb->s_root);
goto out;
out_freedpd:
return (void *)whname;
parent = dget_parent(dentry);
- lock_dentry(parent);
+ unionfs_lock_dentry(parent);
bstart = dbstart(parent);
bend = dbend(parent);
wh_dentry = ERR_PTR(-ENOENT);
dput(wh_dentry);
wh_dentry = ERR_PTR(-ENOENT);
}
- unlock_dentry(parent);
+ unionfs_unlock_dentry(parent);
dput(parent);
kfree(whname);
return wh_dentry;
if (S_ISDIR(old_dentry->d_inode->i_mode))
atomic_dec(&UNIONFS_D(old_dentry)->generation);
- unlock_dentry(new_dentry);
- unlock_dentry(old_dentry);
+ unionfs_unlock_dentry(new_dentry);
+ unionfs_unlock_dentry(old_dentry);
return err;
}
* whiteouts).
*/
-static struct workqueue_struct *sioq;
+static struct workqueue_struct *superio_workqueue;
int __init init_sioq(void)
{
int err;
- sioq = create_workqueue("unionfs_siod");
- if (!IS_ERR(sioq))
+ superio_workqueue = create_workqueue("unionfs_siod");
+ if (!IS_ERR(superio_workqueue))
return 0;
- err = PTR_ERR(sioq);
+ err = PTR_ERR(superio_workqueue);
printk(KERN_ERR "create_workqueue failed %d\n", err);
- sioq = NULL;
+ superio_workqueue = NULL;
return err;
}
void __exit stop_sioq(void)
{
- if (sioq)
- destroy_workqueue(sioq);
+ if (superio_workqueue)
+ destroy_workqueue(superio_workqueue);
}
void run_sioq(work_func_t func, struct sioq_args *args)
INIT_WORK(&args->work, func);
init_completion(&args->comp);
- while (!queue_work(sioq, &args->work)) {
+ while (!queue_work(superio_workqueue, &args->work)) {
/* TODO: do accounting if needed */
schedule();
}
complete(&args->comp);
}
-void __delete_whiteouts(struct work_struct *work) {
+void __delete_whiteouts(struct work_struct *work)
+{
struct sioq_args *args = container_of(work, struct sioq_args, work);
struct deletewh_args *d = &args->deletewh;
verify_locked(dentry);
- lock_dentry(dentry->d_parent);
+ unionfs_lock_dentry(dentry->d_parent);
hidden_parent = unionfs_lower_dentry_idx(dentry->d_parent, bindex);
- unlock_dentry(dentry->d_parent);
+ unionfs_unlock_dentry(dentry->d_parent);
BUG_ON(!S_ISDIR(hidden_parent->d_inode->i_mode));
return err;
}
+/* returns the sum of the n_link values of all the underlying inodes of the
+ * passed inode
+ */
+int unionfs_get_nlinks(struct inode *inode)
+{
+ int sum_nlinks = 0;
+ int dirs = 0;
+ int bindex;
+ struct inode *hidden_inode;
+
+ /* don't bother to do all the work since we're unlinked */
+ if (inode->i_nlink == 0)
+ return 0;
+
+ if (!S_ISDIR(inode->i_mode))
+ return unionfs_lower_inode(inode)->i_nlink;
+
+ for (bindex = ibstart(inode); bindex <= ibend(inode); bindex++) {
+ hidden_inode = unionfs_lower_inode_idx(inode, bindex);
+
+ /* ignore files */
+ if (!hidden_inode || !S_ISDIR(hidden_inode->i_mode))
+ continue;
+
+ BUG_ON(hidden_inode->i_nlink < 0);
+
+ /* A deleted directory. */
+ if (hidden_inode->i_nlink == 0)
+ continue;
+ dirs++;
+
+ /*
+ * A broken directory...
+ *
+ * Some filesystems don't properly set the number of links
+ * on empty directories
+ */
+ if (hidden_inode->i_nlink == 1)
+ sum_nlinks += 2;
+ else
+ sum_nlinks += (hidden_inode->i_nlink - 2);
+ }
+
+ return (!dirs ? 0 : sum_nlinks + 2);
+}
+
+/* construct whiteout filename */
+char *alloc_whname(const char *name, int len)
+{
+ char *buf;
+
+ buf = kmalloc(len + UNIONFS_WHLEN + 1, GFP_KERNEL);
+ if (!buf)
+ return ERR_PTR(-ENOMEM);
+
+ strcpy(buf, UNIONFS_WHPFX);
+ strlcat(buf, name, len + UNIONFS_WHLEN + 1);
+
+ return buf;
+}
+
int bindex, bstart, bend;
int perms;
- lock_dentry(sb->s_root);
+ unionfs_lock_dentry(sb->s_root);
tmp_page = (char*) __get_free_page(GFP_KERNEL);
if (!tmp_page) {
}
out:
- if (tmp_page)
- free_page((unsigned long) tmp_page);
+ free_page((unsigned long) tmp_page);
- unlock_dentry(sb->s_root);
+ unionfs_unlock_dentry(sb->s_root);
return ret;
}
* unionfs function from the VFS. Our lock ordering is that children
* go before their parents.
*/
- struct semaphore sem;
+ struct mutex lock;
int bstart;
int bend;
int bopaque;
d1 = d2;
d2 = tmp;
}
- lock_dentry(d1);
- lock_dentry(d2);
+ unionfs_lock_dentry(d1);
+ unionfs_lock_dentry(d2);
}
extern int new_dentry_private_data(struct dentry *dentry);
extern int do_delete_whiteouts(struct dentry *dentry, int bindex,
struct unionfs_dir_state *namelist);
+extern int unionfs_get_nlinks(struct inode *inode);
+
/* Is this directory empty: 0 if it is empty, -ENOTEMPTY if not. */
extern int check_empty(struct dentry *dentry,
struct unionfs_dir_state **namelist);
return d_unhashed(d) && (d != d->d_sb->s_root);
}
-/* returns the sum of the n_link values of all the underlying inodes of the
- * passed inode
- */
-static inline int unionfs_get_nlinks(struct inode *inode)
-{
- int sum_nlinks = 0;
- int dirs = 0;
- int bindex;
- struct inode *hidden_inode;
-
- /* don't bother to do all the work since we're unlinked */
- if (inode->i_nlink == 0)
- return 0;
-
- if (!S_ISDIR(inode->i_mode))
- return unionfs_lower_inode(inode)->i_nlink;
-
- for (bindex = ibstart(inode); bindex <= ibend(inode); bindex++) {
- hidden_inode = unionfs_lower_inode_idx(inode, bindex);
-
- /* ignore files */
- if (!hidden_inode || !S_ISDIR(hidden_inode->i_mode))
- continue;
-
- BUG_ON(hidden_inode->i_nlink < 0);
-
- /* A deleted directory. */
- if (hidden_inode->i_nlink == 0)
- continue;
- dirs++;
-
- /*
- * A broken directory...
- *
- * Some filesystems don't properly set the number of links
- * on empty directories
- */
- if (hidden_inode->i_nlink == 1)
- sum_nlinks += 2;
- else
- sum_nlinks += (hidden_inode->i_nlink - 2);
- }
-
- return (!dirs ? 0 : sum_nlinks + 2);
-}
-
struct dentry *unionfs_lookup_backend(struct dentry *dentry, struct nameidata *nd, int lookupmode);
#define IS_SET(sb, check_flag) ((check_flag) & MOUNT_FLAG(sb))
#define UNIONFS_DIR_OPAQUE_NAME "__dir_opaque"
#define UNIONFS_DIR_OPAQUE UNIONFS_WHPFX UNIONFS_DIR_OPAQUE_NAME
-/* construct whiteout filename */
-static inline char *alloc_whname(const char *name, int len)
-{
- char *buf;
-
- buf = kmalloc(len + UNIONFS_WHLEN + 1, GFP_KERNEL);
- if (!buf)
- return ERR_PTR(-ENOMEM);
-
- strcpy(buf, UNIONFS_WHPFX);
- strlcat(buf, name, len + UNIONFS_WHLEN + 1);
-
- return buf;
-}
-
#define VALID_MOUNT_FLAGS (0)
#ifndef DEFAULT_POLLMASK
/*
* EXTERNALS:
*/
+extern char *alloc_whname(const char *name, int len);
/* These two functions are here because it is kind of daft to copy and paste the
* contents of the two functions to 32+ places in unionfs
{
int err = 0;
- lock_dentry(dentry);
+ unionfs_lock_dentry(dentry);
err = unionfs_unlink_whiteout(dir, dentry);
/* call d_drop so the system "forgets" about us */
if (!err)
d_drop(dentry);
- unlock_dentry(dentry);
+ unionfs_unlock_dentry(dentry);
return err;
}
int err = 0;
struct unionfs_dir_state *namelist = NULL;
- lock_dentry(dentry);
+ unionfs_lock_dentry(dentry);
/* check if this unionfs directory is empty or not */
err = check_empty(dentry, &namelist);
if (namelist)
free_rdstate(namelist);
- unlock_dentry(dentry);
+ unionfs_unlock_dentry(dentry);
return err;
}
struct dentry *hidden_dentry = NULL;
int err = -EOPNOTSUPP;
- lock_dentry(dentry);
+ unionfs_lock_dentry(dentry);
hidden_dentry = unionfs_lower_dentry(dentry);
err = vfs_getxattr(hidden_dentry, (char*) name, value, size);
- unlock_dentry(dentry);
+ unionfs_unlock_dentry(dentry);
return err;
}
struct dentry *hidden_dentry = NULL;
int err = -EOPNOTSUPP;
- lock_dentry(dentry);
+ unionfs_lock_dentry(dentry);
hidden_dentry = unionfs_lower_dentry(dentry);
err = vfs_setxattr(hidden_dentry, (char*) name, (void*) value, size, flags);
- unlock_dentry(dentry);
+ unionfs_unlock_dentry(dentry);
return err;
}
struct dentry *hidden_dentry = NULL;
int err = -EOPNOTSUPP;
- lock_dentry(dentry);
+ unionfs_lock_dentry(dentry);
hidden_dentry = unionfs_lower_dentry(dentry);
err = vfs_removexattr(hidden_dentry, (char*) name);
- unlock_dentry(dentry);
+ unionfs_unlock_dentry(dentry);
return err;
}
int err = -EOPNOTSUPP;
char *encoded_list = NULL;
- lock_dentry(dentry);
+ unionfs_lock_dentry(dentry);
hidden_dentry = unionfs_lower_dentry(dentry);
encoded_list = list;
err = vfs_listxattr(hidden_dentry, encoded_list, size);
- unlock_dentry(dentry);
+ unionfs_unlock_dentry(dentry);
return err;
}