Skip to contentSkip to conversation

nfsd: remove weird compile-time conditional for EDQUOT

PATCH In review Jeff Layton 1 participant 2 messages Oct 17, 2022

Subsystems (2)
lore
Share & tools
lore

Jeff Layton

author maintainer
#0 lore raw

PATCH 1/1 nfsd: remove weird compile-time conditional for EDQUOT

I don't see any other places in the kernel that test for this symbol before trying to use it. Remove the #ifdef.

---
 fs/nfsd/vfs.c | 2 --
 1 file changed, 2 deletions(-)

This builds for me, but I'm on a "standard" arch (x86_64). I think we'll just have to put this in linux-next and see if any exotic arches or configurations barf on it.

fs/nfsd/vfs.c +0 -2
index 27dd9ac992ee..bee6f4a32f3b 100644
@@ -84,9 +84,7 @@ nfserrno (int errno)
 		{ nfserr_mlink, -EMLINK },
 		{ nfserr_nametoolong, -ENAMETOOLONG },
 		{ nfserr_notempty, -ENOTEMPTY },
-#ifdef EDQUOT
 		{ nfserr_dquot, -EDQUOT },
-#endif
 		{ nfserr_stale, -ESTALE },
 		{ nfserr_jukebox, -ETIMEDOUT },
 		{ nfserr_jukebox, -ERESTARTSYS },
Signature · 1 line
2.37.3
author maintainer
#1 lore raw
Quoted 18 lines · Jeff Layton

I don't see any other places in the kernel that test for this symbol before trying to use it. Remove the #ifdef.

---
 fs/nfsd/vfs.c | 2 --
 1 file changed, 2 deletions(-)

This builds for me, but I'm on a "standard" arch (x86_64). I think we'll just have to put this in linux-next and see if any exotic arches or configurations barf on it.

fs/nfsd/vfs.c +0 -0
index 27dd9ac992ee..bee6f4a32f3b 100644

fs/nfsd/vfs.c nfserrno (int errno) · line 90

Quoted 9 lines
fs/nfsd/vfs.c +0 -2
@@ -84,9 +84,7 @@ nfserrno (int errno)
 		{ nfserr_mlink, -EMLINK },
 		{ nfserr_nametoolong, -ENAMETOOLONG },
 		{ nfserr_notempty, -ENOTEMPTY },
-#ifdef EDQUOT
 		{ nfserr_dquot, -EDQUOT },
-#endif
 		{ nfserr_stale, -ESTALE },
 		{ nfserr_jukebox, -ETIMEDOUT },
 		{ nfserr_jukebox, -ERESTARTSYS },

I did a bit more archaeology...

It looks like this #ifdef dates back to the original merge of nfsd into the kernel in v2.1.32 (~Mar 10th 1997)!

I think we can safely dispense with it now that EDQUOT is a full-fledged errno value and has been for ages.

Signature · 1 line
Jeff Layton <[email protected]>