diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-05-17 22:42:17 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-06-29 12:56:49 +0400 |
commit | 4acf381e1b6c01d6058d353191259c952bd6f3e7 (patch) | |
tree | 18be352e5f1494593e4f2555e8f9699cbee612ce /fs/reiserfs/xattr.c | |
parent | 956ce2083c93c6ce0a8504d000746b1bea4fe111 (diff) | |
download | linux-stable-4acf381e1b6c01d6058d353191259c952bd6f3e7.tar.gz linux-stable-4acf381e1b6c01d6058d353191259c952bd6f3e7.tar.bz2 linux-stable-4acf381e1b6c01d6058d353191259c952bd6f3e7.zip |
[readdir] convert reiserfs
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/reiserfs/xattr.c')
-rw-r--r-- | fs/reiserfs/xattr.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c index 821bcf70e467..26648a451e87 100644 --- a/fs/reiserfs/xattr.c +++ b/fs/reiserfs/xattr.c @@ -171,6 +171,7 @@ static struct dentry *open_xa_dir(const struct inode *inode, int flags) * modifying extended attributes. This includes operations such as permissions * or ownership changes, object deletions, etc. */ struct reiserfs_dentry_buf { + struct dir_context ctx; struct dentry *xadir; int count; struct dentry *dentries[8]; @@ -223,9 +224,8 @@ static int reiserfs_for_each_xattr(struct inode *inode, { struct dentry *dir; int i, err = 0; - loff_t pos = 0; struct reiserfs_dentry_buf buf = { - .count = 0, + .ctx.actor = fill_with_dentries, }; /* Skip out, an xattr has no xattrs associated with it */ @@ -249,7 +249,7 @@ static int reiserfs_for_each_xattr(struct inode *inode, reiserfs_write_lock(inode->i_sb); buf.xadir = dir; - err = reiserfs_readdir_dentry(dir, &buf, fill_with_dentries, &pos); + err = reiserfs_readdir_dentry(dir, &buf.ctx); while ((err == 0 || err == -ENOSPC) && buf.count) { err = 0; @@ -266,8 +266,7 @@ static int reiserfs_for_each_xattr(struct inode *inode, } buf.count = 0; if (!err) - err = reiserfs_readdir_dentry(dir, &buf, - fill_with_dentries, &pos); + err = reiserfs_readdir_dentry(dir, &buf.ctx); } mutex_unlock(&dir->d_inode->i_mutex); @@ -800,6 +799,7 @@ int reiserfs_removexattr(struct dentry *dentry, const char *name) } struct listxattr_buf { + struct dir_context ctx; size_t size; size_t pos; char *buf; @@ -845,8 +845,8 @@ ssize_t reiserfs_listxattr(struct dentry * dentry, char *buffer, size_t size) { struct dentry *dir; int err = 0; - loff_t pos = 0; struct listxattr_buf buf = { + .ctx.actor = listxattr_filler, .dentry = dentry, .buf = buffer, .size = buffer ? size : 0, @@ -868,7 +868,7 @@ ssize_t reiserfs_listxattr(struct dentry * dentry, char *buffer, size_t size) } mutex_lock_nested(&dir->d_inode->i_mutex, I_MUTEX_XATTR); - err = reiserfs_readdir_dentry(dir, &buf, listxattr_filler, &pos); + err = reiserfs_readdir_dentry(dir, &buf.ctx); mutex_unlock(&dir->d_inode->i_mutex); if (!err) |