Simplify these defines for consistency, readability, and clarity. Signed-off-by: Benjamin Coddington --- fs/nfsd/nfsctl.c | 2 +- include/uapi/linux/nfsd/export.h | 38 ++++++++++++++++---------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index 30caefb2522f..8ccc65bb09fd 100644 --- a/fs/nfsd/nfsctl.c +++ b/fs/nfsd/nfsctl.c @@ -169,7 +169,7 @@ static const struct file_operations exports_nfsd_operations = { static int export_features_show(struct seq_file *m, void *v) { - seq_printf(m, "0x%x 0x%x\n", NFSEXP_ALLFLAGS, NFSEXP_SECINFO_FLAGS); + seq_printf(m, "0x%lx 0x%lx\n", NFSEXP_ALLFLAGS, NFSEXP_SECINFO_FLAGS); return 0; } diff --git a/include/uapi/linux/nfsd/export.h b/include/uapi/linux/nfsd/export.h index a73ca3703abb..4e712bb02322 100644 --- a/include/uapi/linux/nfsd/export.h +++ b/include/uapi/linux/nfsd/export.h @@ -26,22 +26,22 @@ * Please update the expflags[] array in fs/nfsd/export.c when adding * a new flag. */ -#define NFSEXP_READONLY 0x0001 -#define NFSEXP_INSECURE_PORT 0x0002 -#define NFSEXP_ROOTSQUASH 0x0004 -#define NFSEXP_ALLSQUASH 0x0008 -#define NFSEXP_ASYNC 0x0010 -#define NFSEXP_GATHERED_WRITES 0x0020 -#define NFSEXP_NOREADDIRPLUS 0x0040 -#define NFSEXP_SECURITY_LABEL 0x0080 -/* 0x100 currently unused */ -#define NFSEXP_NOHIDE 0x0200 -#define NFSEXP_NOSUBTREECHECK 0x0400 -#define NFSEXP_NOAUTHNLM 0x0800 /* Don't authenticate NLM requests - just trust */ -#define NFSEXP_MSNFS 0x1000 /* do silly things that MS clients expect; no longer supported */ -#define NFSEXP_FSID 0x2000 -#define NFSEXP_CROSSMOUNT 0x4000 -#define NFSEXP_NOACL 0x8000 /* reserved for possible ACL related use */ +#define NFSEXP_READONLY BIT(0) +#define NFSEXP_INSECURE_PORT BIT(1) +#define NFSEXP_ROOTSQUASH BIT(2) +#define NFSEXP_ALLSQUASH BIT(3) +#define NFSEXP_ASYNC BIT(4) +#define NFSEXP_GATHERED_WRITES BIT(5) +#define NFSEXP_NOREADDIRPLUS BIT(6) +#define NFSEXP_SECURITY_LABEL BIT(7) +/* BIT(8) currently unused */ +#define NFSEXP_NOHIDE BIT(9) +#define NFSEXP_NOSUBTREECHECK BIT(10) +#define NFSEXP_NOAUTHNLM BIT(11) /* Don't authenticate NLM requests - just trust */ +#define NFSEXP_MSNFS BIT(12) /* do silly things that MS clients expect; no longer supported */ +#define NFSEXP_FSID BIT(13) +#define NFSEXP_CROSSMOUNT BIT(14) +#define NFSEXP_NOACL BIT(15) /* reserved for possible ACL related use */ /* * The NFSEXP_V4ROOT flag causes the kernel to give access only to NFSv4 * clients, and only to the single directory that is the root of the @@ -51,11 +51,11 @@ * pseudofilesystem, which provides access only to paths leading to each * exported filesystem. */ -#define NFSEXP_V4ROOT 0x10000 -#define NFSEXP_PNFS 0x20000 +#define NFSEXP_V4ROOT BIT(16) +#define NFSEXP_PNFS BIT(17) /* All flags that we claim to support. (Note we don't support NOACL.) */ -#define NFSEXP_ALLFLAGS 0x3FEFF +#define NFSEXP_ALLFLAGS BIT(18) - BIT(8) - 1 /* The flags that may vary depending on security flavor: */ #define NFSEXP_SECINFO_FLAGS (NFSEXP_READONLY | NFSEXP_ROOTSQUASH \ -- 2.50.1