Skip to contentSkip to conversation

NFS: Remove CONFIG_NFS_V4 checks from nfs_idmap.h

PATCH Superseded Anna Schumaker 2 participants 3 messages Apr 14, 2015

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NFS: Remove CONFIG_NFS_V4 checks from nfs_idmap.h

The idmapper is completely internal to the NFS v4 module, so this macro will always evaluate to true. This patch also removes unnecessary includes of this file from the generic NFS client.

---
 fs/nfs/client.c           |  1 -
 fs/nfs/super.c            |  1 -
 include/linux/nfs_idmap.h | 11 -----------
 3 files changed, 13 deletions(-)
fs/nfs/client.c +0 -1
index 1987415..892aeff 100644
@@ -31,7 +31,6 @@
 #include <linux/lockd/bind.h>
 #include <linux/seq_file.h>
 #include <linux/mount.h>
-#include <linux/nfs_idmap.h>
 #include <linux/vfs.h>
 #include <linux/inet.h>
 #include <linux/in6.h>
fs/nfs/super.c +0 -1
index 54a079a..e862093 100644
@@ -43,7 +43,6 @@
 #include <linux/seq_file.h>
 #include <linux/mount.h>
 #include <linux/namei.h>
-#include <linux/nfs_idmap.h>
 #include <linux/vfs.h>
 #include <linux/inet.h>
 #include <linux/in6.h>
include/linux/nfs_idmap.h +0 -11
index 333844e..daaf3ea 100644
@@ -46,19 +46,8 @@ struct nfs_server;
 struct nfs_fattr;
 struct nfs4_string;
 
-#if IS_ENABLED(CONFIG_NFS_V4)
 int nfs_idmap_init(void);
 void nfs_idmap_quit(void);
-#else
-static inline int nfs_idmap_init(void)
-{
-	return 0;
-}
-
-static inline void nfs_idmap_quit(void)
-{}
-#endif
-
 int nfs_idmap_new(struct nfs_client *);
 void nfs_idmap_delete(struct nfs_client *);
 
Signature · 1 line
2.3.5
Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Anna Schumaker

The idmapper is completely internal to the NFS v4 module, so this macro will always evaluate to true. This patch also removes unnecessary includes of this file from the generic NFS client.

Seems like the header should move to fs/nfs/ as well..

#2 lore raw
Quoted 10 lines · Christoph Hellwig
Quoted 3 lines · Anna Schumaker

The idmapper is completely internal to the NFS v4 module, so this macro will always evaluate to true. This patch also removes unnecessary includes of this file from the generic NFS client.

Seems like the header should move to fs/nfs/ as well..

Want me to send another patch moving the header? Are there guidelines for when a header should be in include/ and when it should be in our subdirectory?

Anna