diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2014-10-30 12:37:34 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-10-31 17:48:54 -0400 |
commit | ac7576f4b1da8c9c6bc1ae026c2b9e86ae617ba5 (patch) | |
tree | d1bc42645ba37d31ce4cd2208f8e4ab14d47467c /fs/nfsd | |
parent | 9f2f7d4c8dfcf4617af5de6ea381b91deac3db48 (diff) |
vfs: make first argument of dir_context.actor typed
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/nfs4recover.c | 5 | ||||
-rw-r--r-- | fs/nfsd/vfs.c | 12 | ||||
-rw-r--r-- | fs/nfsd/vfs.h | 4 |
3 files changed, 12 insertions, 9 deletions
diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c index a25490ae6c62..0e71a0dd58ca 100644 --- a/fs/nfsd/nfs4recover.c +++ b/fs/nfsd/nfs4recover.c | |||
@@ -245,10 +245,11 @@ struct nfs4_dir_ctx { | |||
245 | }; | 245 | }; |
246 | 246 | ||
247 | static int | 247 | static int |
248 | nfsd4_build_namelist(void *arg, const char *name, int namlen, | 248 | nfsd4_build_namelist(struct dir_context *__ctx, const char *name, int namlen, |
249 | loff_t offset, u64 ino, unsigned int d_type) | 249 | loff_t offset, u64 ino, unsigned int d_type) |
250 | { | 250 | { |
251 | struct nfs4_dir_ctx *ctx = arg; | 251 | struct nfs4_dir_ctx *ctx = |
252 | container_of(__ctx, struct nfs4_dir_ctx, ctx); | ||
252 | struct name_list *entry; | 253 | struct name_list *entry; |
253 | 254 | ||
254 | if (namlen != HEXDIR_LEN - 1) | 255 | if (namlen != HEXDIR_LEN - 1) |
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index 989129e2d6ea..161d2d51b6f2 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c | |||
@@ -1819,10 +1819,12 @@ struct readdir_data { | |||
1819 | int full; | 1819 | int full; |
1820 | }; | 1820 | }; |
1821 | 1821 | ||
1822 | static int nfsd_buffered_filldir(void *__buf, const char *name, int namlen, | 1822 | static int nfsd_buffered_filldir(struct dir_context *ctx, const char *name, |
1823 | loff_t offset, u64 ino, unsigned int d_type) | 1823 | int namlen, loff_t offset, u64 ino, |
1824 | unsigned int d_type) | ||
1824 | { | 1825 | { |
1825 | struct readdir_data *buf = __buf; | 1826 | struct readdir_data *buf = |
1827 | container_of(ctx, struct readdir_data, ctx); | ||
1826 | struct buffered_dirent *de = (void *)(buf->dirent + buf->used); | 1828 | struct buffered_dirent *de = (void *)(buf->dirent + buf->used); |
1827 | unsigned int reclen; | 1829 | unsigned int reclen; |
1828 | 1830 | ||
@@ -1842,7 +1844,7 @@ static int nfsd_buffered_filldir(void *__buf, const char *name, int namlen, | |||
1842 | return 0; | 1844 | return 0; |
1843 | } | 1845 | } |
1844 | 1846 | ||
1845 | static __be32 nfsd_buffered_readdir(struct file *file, filldir_t func, | 1847 | static __be32 nfsd_buffered_readdir(struct file *file, nfsd_filldir_t func, |
1846 | struct readdir_cd *cdp, loff_t *offsetp) | 1848 | struct readdir_cd *cdp, loff_t *offsetp) |
1847 | { | 1849 | { |
1848 | struct buffered_dirent *de; | 1850 | struct buffered_dirent *de; |
@@ -1926,7 +1928,7 @@ static __be32 nfsd_buffered_readdir(struct file *file, filldir_t func, | |||
1926 | */ | 1928 | */ |
1927 | __be32 | 1929 | __be32 |
1928 | nfsd_readdir(struct svc_rqst *rqstp, struct svc_fh *fhp, loff_t *offsetp, | 1930 | nfsd_readdir(struct svc_rqst *rqstp, struct svc_fh *fhp, loff_t *offsetp, |
1929 | struct readdir_cd *cdp, filldir_t func) | 1931 | struct readdir_cd *cdp, nfsd_filldir_t func) |
1930 | { | 1932 | { |
1931 | __be32 err; | 1933 | __be32 err; |
1932 | struct file *file; | 1934 | struct file *file; |
diff --git a/fs/nfsd/vfs.h b/fs/nfsd/vfs.h index c2ff3f14e5f6..b1796d6ee538 100644 --- a/fs/nfsd/vfs.h +++ b/fs/nfsd/vfs.h | |||
@@ -36,7 +36,7 @@ | |||
36 | /* | 36 | /* |
37 | * Callback function for readdir | 37 | * Callback function for readdir |
38 | */ | 38 | */ |
39 | typedef int (*nfsd_dirop_t)(struct inode *, struct dentry *, int, int); | 39 | typedef int (*nfsd_filldir_t)(void *, const char *, int, loff_t, u64, unsigned); |
40 | 40 | ||
41 | /* nfsd/vfs.c */ | 41 | /* nfsd/vfs.c */ |
42 | int nfsd_racache_init(int); | 42 | int nfsd_racache_init(int); |
@@ -95,7 +95,7 @@ __be32 nfsd_rename(struct svc_rqst *, | |||
95 | __be32 nfsd_unlink(struct svc_rqst *, struct svc_fh *, int type, | 95 | __be32 nfsd_unlink(struct svc_rqst *, struct svc_fh *, int type, |
96 | char *name, int len); | 96 | char *name, int len); |
97 | __be32 nfsd_readdir(struct svc_rqst *, struct svc_fh *, | 97 | __be32 nfsd_readdir(struct svc_rqst *, struct svc_fh *, |
98 | loff_t *, struct readdir_cd *, filldir_t); | 98 | loff_t *, struct readdir_cd *, nfsd_filldir_t); |
99 | __be32 nfsd_statfs(struct svc_rqst *, struct svc_fh *, | 99 | __be32 nfsd_statfs(struct svc_rqst *, struct svc_fh *, |
100 | struct kstatfs *, int access); | 100 | struct kstatfs *, int access); |
101 | 101 | ||