diff options
author | Pavel Shilovsky <piastry@etersoft.ru> | 2012-03-17 04:41:12 -0400 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2012-07-27 16:17:40 -0400 |
commit | f436720e94ac53413e20c48b02d16e2ef180e166 (patch) | |
tree | fa831b67f689a847fcdb0942ad624c6d060594de /fs/cifs/smb1ops.c | |
parent | ff691e969433a54e26fb6502a6613e02c680e8ee (diff) |
CIFS: Separate protocol specific part from mkdir
Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/smb1ops.c')
-rw-r--r-- | fs/cifs/smb1ops.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/fs/cifs/smb1ops.c b/fs/cifs/smb1ops.c index c40356d24c5c..861e2df0c37d 100644 --- a/fs/cifs/smb1ops.c +++ b/fs/cifs/smb1ops.c | |||
@@ -586,6 +586,27 @@ cifs_print_stats(struct seq_file *m, struct cifs_tcon *tcon) | |||
586 | #endif | 586 | #endif |
587 | } | 587 | } |
588 | 588 | ||
589 | static void | ||
590 | cifs_mkdir_setinfo(struct inode *inode, const char *full_path, | ||
591 | struct cifs_sb_info *cifs_sb, struct cifs_tcon *tcon, | ||
592 | const unsigned int xid) | ||
593 | { | ||
594 | FILE_BASIC_INFO info; | ||
595 | struct cifsInodeInfo *cifsInode; | ||
596 | u32 dosattrs; | ||
597 | int rc; | ||
598 | |||
599 | memset(&info, 0, sizeof(info)); | ||
600 | cifsInode = CIFS_I(inode); | ||
601 | dosattrs = cifsInode->cifsAttrs|ATTR_READONLY; | ||
602 | info.Attributes = cpu_to_le32(dosattrs); | ||
603 | rc = CIFSSMBSetPathInfo(xid, tcon, full_path, &info, cifs_sb->local_nls, | ||
604 | cifs_sb->mnt_cifs_flags & | ||
605 | CIFS_MOUNT_MAP_SPECIAL_CHR); | ||
606 | if (rc == 0) | ||
607 | cifsInode->cifsAttrs = dosattrs; | ||
608 | } | ||
609 | |||
589 | struct smb_version_operations smb1_operations = { | 610 | struct smb_version_operations smb1_operations = { |
590 | .send_cancel = send_nt_cancel, | 611 | .send_cancel = send_nt_cancel, |
591 | .compare_fids = cifs_compare_fids, | 612 | .compare_fids = cifs_compare_fids, |
@@ -620,6 +641,8 @@ struct smb_version_operations smb1_operations = { | |||
620 | .get_srv_inum = cifs_get_srv_inum, | 641 | .get_srv_inum = cifs_get_srv_inum, |
621 | .build_path_to_root = cifs_build_path_to_root, | 642 | .build_path_to_root = cifs_build_path_to_root, |
622 | .echo = CIFSSMBEcho, | 643 | .echo = CIFSSMBEcho, |
644 | .mkdir = CIFSSMBMkDir, | ||
645 | .mkdir_setinfo = cifs_mkdir_setinfo, | ||
623 | }; | 646 | }; |
624 | 647 | ||
625 | struct smb_version_values smb1_values = { | 648 | struct smb_version_values smb1_values = { |