Patch "afs: Fix creation calls in the dynamic root to fail with EOPNOTSUPP" has been added to the 5.4-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

    afs: Fix creation calls in the dynamic root to fail with EOPNOTSUPP

to the 5.4-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:
     afs-fix-creation-calls-in-the-dynamic-root-to-fail-w.patch
and it can be found in the queue-5.4 subdirectory.

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



commit 027f1e83e3e34d4d805d18e6b83904ee2fdd5bfd
Author: David Howells <dhowells@xxxxxxxxxx>
Date:   Wed Dec 11 08:56:04 2019 +0000

    afs: Fix creation calls in the dynamic root to fail with EOPNOTSUPP
    
    [ Upstream commit 1da4bd9f9d187f53618890d7b66b9628bbec3c70 ]
    
    Fix the lookup method on the dynamic root directory such that creation
    calls, such as mkdir, open(O_CREAT), symlink, etc. fail with EOPNOTSUPP
    rather than failing with some odd error (such as EEXIST).
    
    lookup() itself tries to create automount directories when it is invoked.
    These are cached locally in RAM and not committed to storage.
    
    Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
    Reviewed-by: Marc Dionne <marc.dionne@xxxxxxxxxxxx>
    Tested-by: Jonathan Billings <jsbillings@xxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/afs/dynroot.c b/fs/afs/dynroot.c
index 4150280509ff..7503899c0a1b 100644
--- a/fs/afs/dynroot.c
+++ b/fs/afs/dynroot.c
@@ -136,6 +136,9 @@ static struct dentry *afs_dynroot_lookup(struct inode *dir, struct dentry *dentr
 
 	ASSERTCMP(d_inode(dentry), ==, NULL);
 
+	if (flags & LOOKUP_CREATE)
+		return ERR_PTR(-EOPNOTSUPP);
+
 	if (dentry->d_name.len >= AFSNAMEMAX) {
 		_leave(" = -ENAMETOOLONG");
 		return ERR_PTR(-ENAMETOOLONG);



[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