Patch "nfsd: don't create nfsv4recoverydir in nfsdfs when not used." has been added to the 6.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    nfsd: don't create nfsv4recoverydir in nfsdfs when not used.

to the 6.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     nfsd-don-t-create-nfsv4recoverydir-in-nfsdfs-when-no.patch
and it can be found in the queue-6.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 919645e1c5df97fe0cac8f3921d47843fb78b658
Author: NeilBrown <neilb@xxxxxxx>
Date:   Wed Apr 17 07:23:02 2024 +1000

    nfsd: don't create nfsv4recoverydir in nfsdfs when not used.
    
    [ Upstream commit 0770249b90f9d9f69714b76adc36cf6c895bc1f9 ]
    
    When CONFIG_NFSD_LEGACY_CLIENT_TRACKING is not set, the virtual file
      /proc/fs/nfsd/nfsv4recoverydir
    is created but responds EINVAL to any access.
    This is not useful, is somewhat surprising, and it causes ltp to
    complain.
    
    The only known user of this file is in nfs-utils, which handles
    non-existence and read-failure equally well.  So there is nothing to
    gain from leaving the file present but inaccessible.
    
    So this patch removes the file when its content is not available - i.e.
    when that config option is not selected.
    
    Also remove the #ifdef which hides some of the enum values when
    CONFIG_NFSD_V$ not selection.  simple_fill_super() quietly ignores array
    entries that are not present, so having slots in the array that don't
    get used is perfectly acceptable.  So there is no value in this #ifdef.
    
    Reported-by: Petr Vorel <pvorel@xxxxxxx>
    Reviewed-by: Jeff Layton <jlayton@xxxxxxxxxx>
    Fixes: 74fd48739d04 ("nfsd: new Kconfig option for legacy client tracking")
    Signed-off-by: NeilBrown <neilb@xxxxxxx>
    Reviewed-by: Petr Vorel <pvorel@xxxxxxx>
    Signed-off-by: Chuck Lever <chuck.lever@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index ecd18bffeebc7..4d23bb1d08c0a 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -48,12 +48,10 @@ enum {
 	NFSD_MaxBlkSize,
 	NFSD_MaxConnections,
 	NFSD_Filecache,
-#ifdef CONFIG_NFSD_V4
 	NFSD_Leasetime,
 	NFSD_Gracetime,
 	NFSD_RecoveryDir,
 	NFSD_V4EndGrace,
-#endif
 	NFSD_MaxReserved
 };
 
@@ -1360,7 +1358,9 @@ static int nfsd_fill_super(struct super_block *sb, struct fs_context *fc)
 #ifdef CONFIG_NFSD_V4
 		[NFSD_Leasetime] = {"nfsv4leasetime", &transaction_ops, S_IWUSR|S_IRUSR},
 		[NFSD_Gracetime] = {"nfsv4gracetime", &transaction_ops, S_IWUSR|S_IRUSR},
+#ifdef CONFIG_NFSD_LEGACY_CLIENT_TRACKING
 		[NFSD_RecoveryDir] = {"nfsv4recoverydir", &transaction_ops, S_IWUSR|S_IRUSR},
+#endif
 		[NFSD_V4EndGrace] = {"v4_end_grace", &transaction_ops, S_IWUSR|S_IRUGO},
 #endif
 		/* last one */ {""}




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux