Patch "smb: client: fix broken file attrs with nodfs mounts" has been added to the 6.1-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

    smb: client: fix broken file attrs with nodfs mounts

to the 6.1-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:
     smb-client-fix-broken-file-attrs-with-nodfs-mounts.patch
and it can be found in the queue-6.1 subdirectory.

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



commit 1a78eb37a341ea50715c7d01ee59d9e8b50a53f3
Author: Paulo Alcantara <pc@xxxxxxxxxxxxx>
Date:   Tue Jun 27 21:24:49 2023 -0300

    smb: client: fix broken file attrs with nodfs mounts
    
    [ Upstream commit d439b29057e26464120fc6c18f97433aa003b5fe ]
    
    *_get_inode_info() functions expect -EREMOTE when query path info
    calls find a DFS link, regardless whether !CONFIG_CIFS_DFS_UPCALL or
    'nodfs' mount option.  Otherwise, those files will miss the fake DFS
    file attributes.
    
    Before patch
    
      $ mount.cifs //srv/dfs /mnt/1 -o ...,nodfs
      $ ls -l /mnt/1
      ls: cannot access '/mnt/1/link': Operation not supported
      total 0
      -rwxr-xr-x 1 root root 0 Jul 26  2022 dfstest2_file1.txt
      drwxr-xr-x 2 root root 0 Aug  8  2022 dir1
      d????????? ? ?    ?    ?            ? link
    
    After patch
    
      $ mount.cifs //srv/dfs /mnt/1 -o ...,nodfs
      $ ls -l /mnt/1
      total 0
      -rwxr-xr-x 1 root root 0 Jul 26  2022 dfstest2_file1.txt
      drwxr-xr-x 2 root root 0 Aug  8  2022 dir1
      drwx--x--x 2 root root 0 Jun 26 20:29 link
    
    Fixes: c877ce47e137 ("cifs: reduce roundtrips on create/qinfo requests")
    Signed-off-by: Paulo Alcantara (SUSE) <pc@xxxxxxxxxxxxx>
    Signed-off-by: Steve French <stfrench@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/smb/client/smb2inode.c b/fs/smb/client/smb2inode.c
index 57526bdbab171..5ddc629e62168 100644
--- a/fs/smb/client/smb2inode.c
+++ b/fs/smb/client/smb2inode.c
@@ -592,9 +592,6 @@ int smb2_query_path_info(const unsigned int xid, struct cifs_tcon *tcon,
 			if (islink)
 				rc = -EREMOTE;
 		}
-		if (rc == -EREMOTE && IS_ENABLED(CONFIG_CIFS_DFS_UPCALL) && cifs_sb &&
-		    (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_DFS))
-			rc = -EOPNOTSUPP;
 	}
 
 out:



[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