• Home
  • Raw
  • Download

Lines Matching refs:dentry

65 static int xattr_create(struct inode *dir, struct dentry *dentry, int mode)  in xattr_create()  argument
68 return dir->i_op->create(dir, dentry, mode, true); in xattr_create()
72 static int xattr_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) in xattr_mkdir() argument
75 return dir->i_op->mkdir(dir, dentry, mode); in xattr_mkdir()
84 static int xattr_unlink(struct inode *dir, struct dentry *dentry) in xattr_unlink() argument
90 mutex_lock_nested(&d_inode(dentry)->i_mutex, I_MUTEX_CHILD); in xattr_unlink()
91 error = dir->i_op->unlink(dir, dentry); in xattr_unlink()
92 mutex_unlock(&d_inode(dentry)->i_mutex); in xattr_unlink()
95 d_delete(dentry); in xattr_unlink()
99 static int xattr_rmdir(struct inode *dir, struct dentry *dentry) in xattr_rmdir() argument
105 mutex_lock_nested(&d_inode(dentry)->i_mutex, I_MUTEX_CHILD); in xattr_rmdir()
106 error = dir->i_op->rmdir(dir, dentry); in xattr_rmdir()
108 d_inode(dentry)->i_flags |= S_DEAD; in xattr_rmdir()
109 mutex_unlock(&d_inode(dentry)->i_mutex); in xattr_rmdir()
111 d_delete(dentry); in xattr_rmdir()
118 static struct dentry *open_xa_root(struct super_block *sb, int flags) in open_xa_root()
120 struct dentry *privroot = REISERFS_SB(sb)->priv_root; in open_xa_root()
121 struct dentry *xaroot; in open_xa_root()
146 static struct dentry *open_xa_dir(const struct inode *inode, int flags) in open_xa_dir()
148 struct dentry *xaroot, *xadir; in open_xa_dir()
185 struct dentry *xadir;
188 struct dentry *dentries[8];
197 struct dentry *dentry; in fill_with_dentries() local
208 dentry = lookup_one_len(name, dbuf->xadir, namelen); in fill_with_dentries()
209 if (IS_ERR(dentry)) { in fill_with_dentries()
210 dbuf->err = PTR_ERR(dentry); in fill_with_dentries()
211 return PTR_ERR(dentry); in fill_with_dentries()
212 } else if (d_really_is_negative(dentry)) { in fill_with_dentries()
214 reiserfs_error(dentry->d_sb, "xattr-20003", in fill_with_dentries()
217 dentry, dbuf->xadir); in fill_with_dentries()
218 dput(dentry); in fill_with_dentries()
223 dbuf->dentries[dbuf->count++] = dentry; in fill_with_dentries()
238 int (*action)(struct dentry *, void *), in reiserfs_for_each_xattr() argument
241 struct dentry *dir; in reiserfs_for_each_xattr()
274 struct dentry *dentry = buf.dentries[i]; in reiserfs_for_each_xattr() local
276 if (!d_is_dir(dentry)) in reiserfs_for_each_xattr()
277 err = action(dentry, data); in reiserfs_for_each_xattr()
279 dput(dentry); in reiserfs_for_each_xattr()
327 static int delete_one_xattr(struct dentry *dentry, void *data) in delete_one_xattr() argument
329 struct inode *dir = d_inode(dentry->d_parent); in delete_one_xattr()
332 if (d_is_dir(dentry)) in delete_one_xattr()
333 return xattr_rmdir(dir, dentry); in delete_one_xattr()
335 return xattr_unlink(dir, dentry); in delete_one_xattr()
338 static int chown_one_xattr(struct dentry *dentry, void *data) in chown_one_xattr() argument
350 err = reiserfs_setattr(dentry, attrs); in chown_one_xattr()
384 static struct dentry *xattr_lookup(struct inode *inode, const char *name, in xattr_lookup()
387 struct dentry *xadir, *xafile; in xattr_lookup()
473 struct dentry *dentry, *xadir; in lookup_and_delete_xattr() local
480 dentry = lookup_one_len(name, xadir, strlen(name)); in lookup_and_delete_xattr()
481 if (IS_ERR(dentry)) { in lookup_and_delete_xattr()
482 err = PTR_ERR(dentry); in lookup_and_delete_xattr()
486 if (d_really_is_positive(dentry)) { in lookup_and_delete_xattr()
487 err = xattr_unlink(d_inode(xadir), dentry); in lookup_and_delete_xattr()
491 dput(dentry); in lookup_and_delete_xattr()
510 struct dentry *dentry; in reiserfs_xattr_set_handle() local
526 dentry = xattr_lookup(inode, name, flags); in reiserfs_xattr_set_handle()
527 if (IS_ERR(dentry)) in reiserfs_xattr_set_handle()
528 return PTR_ERR(dentry); in reiserfs_xattr_set_handle()
543 page = reiserfs_get_page(d_inode(dentry), file_pos); in reiserfs_xattr_set_handle()
583 if (!err && new_size < i_size_read(d_inode(dentry))) { in reiserfs_xattr_set_handle()
590 mutex_lock_nested(&d_inode(dentry)->i_mutex, I_MUTEX_XATTR); in reiserfs_xattr_set_handle()
591 inode_dio_wait(d_inode(dentry)); in reiserfs_xattr_set_handle()
593 err = reiserfs_setattr(dentry, &newattrs); in reiserfs_xattr_set_handle()
594 mutex_unlock(&d_inode(dentry)->i_mutex); in reiserfs_xattr_set_handle()
599 dput(dentry); in reiserfs_xattr_set_handle()
642 struct dentry *dentry; in reiserfs_xattr_get() local
666 dentry = xattr_lookup(inode, name, XATTR_REPLACE); in reiserfs_xattr_get()
667 if (IS_ERR(dentry)) { in reiserfs_xattr_get()
668 err = PTR_ERR(dentry); in reiserfs_xattr_get()
674 isize = i_size_read(d_inode(dentry)); in reiserfs_xattr_get()
697 page = reiserfs_get_page(d_inode(dentry), file_pos); in reiserfs_xattr_get()
742 dput(dentry); in reiserfs_xattr_get()
785 struct dentry *dentry; member
800 handler = find_xattr_handler_prefix(b->dentry->d_sb->s_xattr, in listxattr_filler()
805 size = handler->list(handler, b->dentry, in listxattr_filler()
813 size = handler->list(handler, b->dentry, in listxattr_filler()
829 ssize_t reiserfs_listxattr(struct dentry * dentry, char *buffer, size_t size) in reiserfs_listxattr() argument
831 struct dentry *dir; in reiserfs_listxattr()
835 .dentry = dentry, in reiserfs_listxattr()
840 if (d_really_is_negative(dentry)) in reiserfs_listxattr()
843 if (!dentry->d_sb->s_xattr || in reiserfs_listxattr()
844 get_inode_sd_version(d_inode(dentry)) == STAT_DATA_V1) in reiserfs_listxattr()
847 dir = open_xa_dir(d_inode(dentry), XATTR_REPLACE); in reiserfs_listxattr()
867 static int create_privroot(struct dentry *dentry) in create_privroot() argument
870 struct inode *inode = d_inode(dentry->d_parent); in create_privroot()
874 err = xattr_mkdir(inode, dentry, 0700); in create_privroot()
875 if (err || d_really_is_negative(dentry)) { in create_privroot()
876 reiserfs_warning(dentry->d_sb, "jdm-20006", in create_privroot()
883 d_inode(dentry)->i_flags |= S_PRIVATE; in create_privroot()
884 reiserfs_info(dentry->d_sb, "Created %s - reserved for xattr " in create_privroot()
893 static int create_privroot(struct dentry *dentry) { return 0; } in create_privroot() argument
947 static int xattr_hide_revalidate(struct dentry *dentry, unsigned int flags) in xattr_hide_revalidate() argument
958 struct dentry *dentry; in reiserfs_lookup_privroot() local
963 dentry = lookup_one_len(PRIVROOT_NAME, s->s_root, in reiserfs_lookup_privroot()
965 if (!IS_ERR(dentry)) { in reiserfs_lookup_privroot()
966 REISERFS_SB(s)->priv_root = dentry; in reiserfs_lookup_privroot()
967 d_set_d_op(dentry, &xattr_lookup_poison_ops); in reiserfs_lookup_privroot()
968 if (d_really_is_positive(dentry)) in reiserfs_lookup_privroot()
969 d_inode(dentry)->i_flags |= S_PRIVATE; in reiserfs_lookup_privroot()
971 err = PTR_ERR(dentry); in reiserfs_lookup_privroot()
985 struct dentry *privroot = REISERFS_SB(s)->priv_root; in reiserfs_xattr_init()
1001 struct dentry *dentry; in reiserfs_xattr_init() local
1003 dentry = lookup_one_len(XAROOT_NAME, privroot, in reiserfs_xattr_init()
1005 if (!IS_ERR(dentry)) in reiserfs_xattr_init()
1006 REISERFS_SB(s)->xattr_root = dentry; in reiserfs_xattr_init()
1008 err = PTR_ERR(dentry); in reiserfs_xattr_init()