summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4recover.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-05-23 04:22:04 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2013-06-29 10:57:05 +0200
commitac6614b76478e68173ccf7ad4e9e98035cc9c21d (patch)
treeed2c996b6e64e44c5a752dfafd650bfa1eb7f035 /fs/nfsd/nfs4recover.c
parent[readdir] ->readdir() is gone (diff)
downloadlinux-ac6614b76478e68173ccf7ad4e9e98035cc9c21d.tar.xz
linux-ac6614b76478e68173ccf7ad4e9e98035cc9c21d.zip
[readdir] constify ->actor
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/nfsd/nfs4recover.c')
-rw-r--r--fs/nfsd/nfs4recover.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c
index 2fa2e2eb190b..105a3b080d12 100644
--- a/fs/nfsd/nfs4recover.c
+++ b/fs/nfsd/nfs4recover.c
@@ -268,7 +268,10 @@ nfsd4_list_rec_dir(recdir_func *f, struct nfsd_net *nn)
{
const struct cred *original_cred;
struct dentry *dir = nn->rec_file->f_path.dentry;
- struct nfs4_dir_ctx ctx;
+ struct nfs4_dir_ctx ctx = {
+ .ctx.actor = nfsd4_build_namelist,
+ .names = LIST_HEAD_INIT(ctx.names)
+ };
int status;
status = nfs4_save_creds(&original_cred);
@@ -281,8 +284,6 @@ nfsd4_list_rec_dir(recdir_func *f, struct nfsd_net *nn)
return status;
}
- INIT_LIST_HEAD(&ctx.names);
- ctx.ctx.actor = nfsd4_build_namelist;
status = iterate_dir(nn->rec_file, &ctx.ctx);
mutex_lock_nested(&dir->d_inode->i_mutex, I_MUTEX_PARENT);
while (!list_empty(&ctx.names)) {