OSDN Git Service

CIFS: make mknod() an smb_version_op
authorAurelien Aptel <aaptel@suse.com>
Thu, 14 Mar 2019 05:29:17 +0000 (00:29 -0500)
committerSteve French <stfrench@microsoft.com>
Fri, 15 Mar 2019 00:32:36 +0000 (19:32 -0500)
commitc847dccfbdc198671e80cd81891ff7a255606aea
tree272f6ae649a3248727277c1a2459e59040236cb4
parent6552580286e5fdcde50206dd0263b63ab87b64fe
CIFS: make mknod() an smb_version_op

This cleanup removes cifs specific code from SMB2/SMB3 code paths
which is cleaner and easier to maintain as the code to handle
special files is improved.  Below is an example creating special files
using 'sfu' mount option over SMB3 to Windows (with this patch)
(Note that to Samba server, support for saving dos attributes
has to be enabled for the SFU mount option to work).

In the future this will also make implementation of creating
special files as reparse points easier (as Windows NFS server does
for example).

   root@smf-Thinkpad-P51:~# stat -c "%F" /mnt2/char
   character special file

   root@smf-Thinkpad-P51:~# stat -c "%F" /mnt2/block
   block special file

Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
fs/cifs/cifsglob.h
fs/cifs/dir.c
fs/cifs/smb1ops.c
fs/cifs/smb2ops.c