]> Git Repo - linux.git/commit - fs/cifs/inode.c
[CIFS] Provide sane values for nlink
authorJim McDonough <[email protected]>
Sat, 21 Sep 2013 15:36:10 +0000 (10:36 -0500)
committerSteve French <[email protected]>
Sat, 21 Sep 2013 15:36:10 +0000 (10:36 -0500)
commit74d290da476f672ad756634d12aa707375d3564d
treeaa972423ddb39e39d49cca13349eb9e07c3d70c3
parent9ae6cf606a33b0a762798df0fb742848bcc685b5
[CIFS] Provide sane values for nlink

Since we don't get info about the number of links from the readdir
linfo levels, stat() will return 0 for st_nlink, and in particular,
samba re-exported shares will show directories as files (as samba is
keying off st_nlink before evaluating how to set the dos modebits)
when doing a dir or ls.

Copy nlink to the inode, unless it wasn't provided.  Provide
sane values if we don't have an existing one and none was provided.

Signed-off-by: Jim McDonough <[email protected]>
Reviewed-by: Jeff Layton <[email protected]>
Reviewed-by: David Disseldorp <[email protected]>
Signed-off-by: Steve French <[email protected]>
fs/cifs/cifsglob.h
fs/cifs/inode.c
fs/cifs/readdir.c
This page took 0.053798 seconds and 4 git commands to generate.