cifs: add support for ioctl on directories
Subsystems (2)
PATCH 1/1 cifs: add support for ioctl on directories
We do not call cifs_open_file() for directories and thus we do not have a pSMBFile we can extract the FIDs from.
Solve this by instead always using a compounded open/query/close for the passthrough ioctl.
Signed-off-by Ronnie Sahlberg <[email protected]>
--- fs/cifs/cifsglob.h | 4 ++- fs/cifs/ioctl.c | 43 +++++++++++++++++++++------ fs/cifs/smb2ops.c | 85 +++++++++++++++++++++++++++++++++++++++++------------- 3 files changed, 102 insertions(+), 30 deletions(-)
fs/cifs/cifsglob.h +3 -1
@@ -33,6 +33,7 @@#define CIFS_MAGIC_NUMBER 0xFF534D42/* the first four bytes of SMB PDUs */ +#define SMB_PATH_MAX 260#define CIFS_PORT 445#define RFC1001_PORT 139
@@ -467,7 +468,8 @@ struct smb_version_operations {int (*next_header)(char *);/* ioctl passthrough for query_info */ int (*ioctl_query_info)(const unsigned int xid, -struct cifsFileInfo *file, +struct cifs_tcon *tcon, +__le16 *path,int is_dir,unsigned long p); };
fs/cifs/ioctl.c +34 -9
58 lines not on this page · raw message
fs/cifs/smb2ops.c +65 -20
126 lines not on this page · raw message
Signature · 1 line
2.13.6