Patch "9p: v9fs_fid_find: also lookup by inode if not found dentry" has been added to the 6.11-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

    9p: v9fs_fid_find: also lookup by inode if not found dentry

to the 6.11-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:
     9p-v9fs_fid_find-also-lookup-by-inode-if-not-found-d.patch
and it can be found in the queue-6.11 subdirectory.

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



commit 181681155e60b2dc1d5966baac4f010aacfd0069
Author: Dominique Martinet <asmadeus@xxxxxxxxxxxxx>
Date:   Thu May 23 20:31:38 2024 +0900

    9p: v9fs_fid_find: also lookup by inode if not found dentry
    
    [ Upstream commit 38d222b3163f7b7d737e5d999ffc890a12870e36 ]
    
    It's possible for v9fs_fid_find "find by dentry" branch to not turn up
    anything despite having an entry set (because e.g. uid doesn't match),
    in which case the calling code will generally make an extra lookup
    to the server.
    
    In this case we might have had better luck looking by inode, so fall
    back to look up by inode if we have one and the lookup by dentry failed.
    
    Message-Id: <20240523210024.1214386-1-asmadeus@xxxxxxxxxxxxx>
    Reviewed-by: Christian Schoenebeck <linux_oss@xxxxxxxxxxxxx>
    Signed-off-by: Dominique Martinet <asmadeus@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/9p/fid.c b/fs/9p/fid.c
index de009a33e0e26..f84412290a30c 100644
--- a/fs/9p/fid.c
+++ b/fs/9p/fid.c
@@ -131,10 +131,9 @@ static struct p9_fid *v9fs_fid_find(struct dentry *dentry, kuid_t uid, int any)
 			}
 		}
 		spin_unlock(&dentry->d_lock);
-	} else {
-		if (dentry->d_inode)
-			ret = v9fs_fid_find_inode(dentry->d_inode, false, uid, any);
 	}
+	if (!ret && dentry->d_inode)
+		ret = v9fs_fid_find_inode(dentry->d_inode, false, uid, any);
 
 	return ret;
 }




[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