Skip to content

Commit 4f253e1

Browse files
jankaratrondmypd
authored andcommitted
nfs: Mark unnecessarily extern functions as static
nfs_initialise_sb() and nfs_clone_super() are declared as extern even though they are used only in fs/nfs/super.c. Mark them as static. Also remove explicit 'inline' directive from nfs_initialise_sb() and leave it upto compiler to decide whether inlining is worth it. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
1 parent 6ea44ad commit 4f253e1

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

fs/nfs/internal.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,6 @@ extern struct file_system_type nfs4_referral_fs_type;
398398
bool nfs_auth_info_match(const struct nfs_auth_info *, rpc_authflavor_t);
399399
struct dentry *nfs_try_mount(int, const char *, struct nfs_mount_info *,
400400
struct nfs_subversion *);
401-
void nfs_initialise_sb(struct super_block *);
402401
int nfs_set_sb_security(struct super_block *, struct dentry *, struct nfs_mount_info *);
403402
int nfs_clone_sb_security(struct super_block *, struct dentry *, struct nfs_mount_info *);
404403
struct dentry *nfs_fs_mount_common(struct nfs_server *, int, const char *,
@@ -458,7 +457,6 @@ extern void nfs_read_prepare(struct rpc_task *task, void *calldata);
458457
extern void nfs_pageio_reset_read_mds(struct nfs_pageio_descriptor *pgio);
459458

460459
/* super.c */
461-
void nfs_clone_super(struct super_block *, struct nfs_mount_info *);
462460
void nfs_umount_begin(struct super_block *);
463461
int nfs_statfs(struct dentry *, struct kstatfs *);
464462
int nfs_show_options(struct seq_file *, struct dentry *);

fs/nfs/super.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2301,7 +2301,7 @@ EXPORT_SYMBOL_GPL(nfs_remount);
23012301
/*
23022302
* Initialise the common bits of the superblock
23032303
*/
2304-
inline void nfs_initialise_sb(struct super_block *sb)
2304+
static void nfs_initialise_sb(struct super_block *sb)
23052305
{
23062306
struct nfs_server *server = NFS_SB(sb);
23072307

@@ -2348,7 +2348,8 @@ EXPORT_SYMBOL_GPL(nfs_fill_super);
23482348
/*
23492349
* Finish setting up a cloned NFS2/3/4 superblock
23502350
*/
2351-
void nfs_clone_super(struct super_block *sb, struct nfs_mount_info *mount_info)
2351+
static void nfs_clone_super(struct super_block *sb,
2352+
struct nfs_mount_info *mount_info)
23522353
{
23532354
const struct super_block *old_sb = mount_info->cloned->sb;
23542355
struct nfs_server *server = NFS_SB(sb);

0 commit comments

Comments
 (0)