summaryrefslogtreecommitdiffstats
path: root/fs/nfs/internal.h
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2020-02-26 19:16:09 -0500
committerTrond Myklebust <trond.myklebust@hammerspace.com>2020-03-16 08:34:30 -0400
commit3c9e502b59fbd243cfac7cc6c875e432d285102a (patch)
treec1d4536d91db8a63bbc8cbc4447323db679900a3 /fs/nfs/internal.h
parent58ac3e59235f1fa174c6e9c5e69111a7b2fa2652 (diff)
downloadlinux-3c9e502b59fbd243cfac7cc6c875e432d285102a.tar.bz2
NFS: Add a helper nfs_client_for_each_server()
Add a helper nfs_client_for_each_server() to iterate through all the filesystems that are attached to a struct nfs_client, and apply a function to all the active ones. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs/internal.h')
-rw-r--r--fs/nfs/internal.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index f80c47d5ff27..3b6fa9edc9b5 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -417,7 +417,9 @@ extern int __init register_nfs_fs(void);
extern void __exit unregister_nfs_fs(void);
extern bool nfs_sb_active(struct super_block *sb);
extern void nfs_sb_deactive(struct super_block *sb);
-
+extern int nfs_client_for_each_server(struct nfs_client *clp,
+ int (*fn)(struct nfs_server *, void *),
+ void *data);
/* io.c */
extern void nfs_start_io_read(struct inode *inode);
extern void nfs_end_io_read(struct inode *inode);