/linux-6.6.21/fs/smb/client/ |
D | inode.c | 32 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); in cifs_set_ops() local 37 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DIRECT_IO) { in cifs_set_ops() 38 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_BRL) in cifs_set_ops() 42 } else if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_STRICT_IO) { in cifs_set_ops() 43 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_BRL) in cifs_set_ops() 47 } else if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_BRL) in cifs_set_ops() 54 if (cifs_sb_master_tcon(cifs_sb)->ses->server->max_read < in cifs_set_ops() 153 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); in cifs_fattr_to_inode() local 181 !(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DYNPERM)) in cifs_fattr_to_inode() 229 struct cifs_sb_info *cifs_sb = CIFS_SB(sb); in cifs_fill_uniqueid() local [all …]
|
D | cifsfs.c | 192 struct cifs_sb_info *cifs_sb; in cifs_read_super() local 197 cifs_sb = CIFS_SB(sb); in cifs_read_super() 198 tcon = cifs_sb_master_tcon(cifs_sb); in cifs_read_super() 200 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIXACL) in cifs_read_super() 247 if (cifs_sb->ctx->rsize == 0) in cifs_read_super() 248 cifs_sb->ctx->rsize = in cifs_read_super() 249 tcon->ses->server->ops->negotiate_rsize(tcon, cifs_sb->ctx); in cifs_read_super() 250 if (cifs_sb->ctx->rasize) in cifs_read_super() 251 sb->s_bdi->ra_pages = cifs_sb->ctx->rasize / PAGE_SIZE; in cifs_read_super() 253 sb->s_bdi->ra_pages = 2 * (cifs_sb->ctx->rsize / PAGE_SIZE); in cifs_read_super() [all …]
|
D | fs_context.c | 826 #define STEAL_STRING(cifs_sb, ctx, field) \ argument 829 ctx->field = cifs_sb->ctx->field; \ 830 cifs_sb->ctx->field = NULL; \ 833 #define STEAL_STRING_SENSITIVE(cifs_sb, ctx, field) \ argument 836 ctx->field = cifs_sb->ctx->field; \ 837 cifs_sb->ctx->field = NULL; \ 844 struct cifs_sb_info *cifs_sb = CIFS_SB(root->d_sb); in smb3_reconfigure() local 847 rc = smb3_verify_reconfigure_ctx(fc, ctx, cifs_sb->ctx); in smb3_reconfigure() 857 STEAL_STRING(cifs_sb, ctx, UNC); in smb3_reconfigure() 858 STEAL_STRING(cifs_sb, ctx, source); in smb3_reconfigure() [all …]
|
D | link.c | 173 struct cifs_sb_info *cifs_sb, const char *fromName, in create_mf_symlink() argument 190 cifs_sb, fromName, buf, &bytes_written); in create_mf_symlink() 206 struct cifs_sb_info *cifs_sb, struct cifs_fattr *fattr, in check_mf_symlink() argument 225 cifs_sb, path, buf, &bytes_read); in check_mf_symlink() 263 struct cifs_sb_info *cifs_sb, const unsigned char *path, in cifs_query_mf_symlink() argument 276 .cifs_sb = cifs_sb, in cifs_query_mf_symlink() 278 .create_options = cifs_create_options(cifs_sb, CREATE_NOT_DIR), in cifs_query_mf_symlink() 308 struct cifs_sb_info *cifs_sb, const unsigned char *path, in cifs_create_mf_symlink() argument 319 .cifs_sb = cifs_sb, in cifs_create_mf_symlink() 321 .create_options = cifs_create_options(cifs_sb, CREATE_NOT_DIR), in cifs_create_mf_symlink() [all …]
|
D | dfs.c | 116 struct cifs_sb_info *cifs_sb = mnt_ctx->cifs_sb; in set_ref_paths() local 120 full_path = smb3_fs_context_fullpath(ctx, CIFS_DIR_SEP(cifs_sb)); in set_ref_paths() 126 ref_path = dfs_get_path(cifs_sb, ctx->UNC); in set_ref_paths() 128 ref_path = dfs_get_path(cifs_sb, full_path); in set_ref_paths() 231 struct cifs_sb_info *cifs_sb = mnt_ctx->cifs_sb; in __dfs_mount_share() local 237 origin_fullpath = dfs_get_path(cifs_sb, ctx->source); in __dfs_mount_share() 331 static int update_server_fullpath(struct TCP_Server_Info *server, struct cifs_sb_info *cifs_sb, in update_server_fullpath() argument 357 npath = dfs_cache_canonical_path(refpath, cifs_sb->local_nls, cifs_remap(cifs_sb)); in update_server_fullpath() 398 struct cifs_sb_info *cifs_sb, in __tree_connect_ipc() argument 423 cifs_sb->local_nls); in __tree_connect_ipc() [all …]
|
D | dir.c | 39 cifs_build_path_to_root(struct smb3_fs_context *ctx, struct cifs_sb_info *cifs_sb, in cifs_build_path_to_root() argument 63 full_path[dfsplen] = CIFS_DIR_SEP(cifs_sb); in cifs_build_path_to_root() 65 convert_delimiter(full_path, CIFS_DIR_SEP(cifs_sb)); in cifs_build_path_to_root() 73 struct cifs_sb_info *cifs_sb = CIFS_SB(direntry->d_sb); in build_path_from_dentry() local 74 struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb); in build_path_from_dentry() 87 struct cifs_sb_info *cifs_sb = CIFS_SB(direntry->d_sb); in __build_path_from_dentry_optional_prefix() local 88 char dirsep = CIFS_DIR_SEP(cifs_sb); in __build_path_from_dentry_optional_prefix() 99 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_USE_PREFIX_PATH) in __build_path_from_dentry_optional_prefix() 100 pplen = cifs_sb->prepath ? strlen(cifs_sb->prepath) + 1 : 0; in __build_path_from_dentry_optional_prefix() 110 cifs_dbg(FYI, "using cifs_sb prepath <%s>\n", cifs_sb->prepath); in __build_path_from_dentry_optional_prefix() [all …]
|
D | readdir.c | 72 struct cifs_sb_info *cifs_sb = CIFS_SB(sb); in cifs_prime_dcache() local 104 if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM)) in cifs_prime_dcache() 154 cifs_fill_common_info(struct cifs_fattr *fattr, struct cifs_sb_info *cifs_sb) in cifs_fill_common_info() argument 160 fattr->cf_uid = cifs_sb->ctx->linux_uid; in cifs_fill_common_info() 161 fattr->cf_gid = cifs_sb->ctx->linux_gid; in cifs_fill_common_info() 172 cifs_reparse_point_to_fattr(cifs_sb, fattr, &data)) in cifs_fill_common_info() 176 fattr->cf_mode = S_IFDIR | cifs_sb->ctx->dir_mode; in cifs_fill_common_info() 179 fattr->cf_mode = S_IFREG | cifs_sb->ctx->file_mode; in cifs_fill_common_info() 205 if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) || in cifs_fill_common_info() 206 (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MODE_FROM_SID)) in cifs_fill_common_info() [all …]
|
D | smb2inode.c | 59 struct cifs_sb_info *cifs_sb, const char *full_path, in smb2_compound_op() argument 102 utf16_path = cifs_convert_path_to_utf16(full_path, cifs_sb); in smb2_compound_op() 113 .create_options = cifs_create_options(cifs_sb, create_options), in smb2_compound_op() 116 .cifs_sb = cifs_sb, in smb2_compound_op() 545 struct cifs_sb_info *cifs_sb, in parse_create_response() argument 558 rc = smb2_parse_symlink_response(cifs_sb, iov, in parse_create_response() 576 struct cifs_sb_info *cifs_sb, in smb2_query_path_info() argument 595 rc = open_cached_dir(xid, tcon, full_path, cifs_sb, false, &cfid); in smb2_query_path_info() 609 rc = smb2_compound_op(xid, tcon, cifs_sb, full_path, FILE_READ_ATTRIBUTES, FILE_OPEN, in smb2_query_path_info() 623 rc = parse_create_response(data, cifs_sb, &out_iov[0]); in smb2_query_path_info() [all …]
|
D | smb1ops.c | 517 struct cifs_sb_info *cifs_sb) in cifs_qfs_tcon() argument 525 struct cifs_sb_info *cifs_sb, const char *full_path) in cifs_is_path_accessible() argument 535 0 /* not legacy */, cifs_sb->local_nls, in cifs_is_path_accessible() 536 cifs_remap(cifs_sb)); in cifs_is_path_accessible() 540 cifs_sb->local_nls, cifs_remap(cifs_sb)); in cifs_is_path_accessible() 547 struct cifs_sb_info *cifs_sb, in cifs_query_path_info() argument 558 rc = CIFSSMBQPathInfo(xid, tcon, full_path, &fi, 0 /* not legacy */, cifs_sb->local_nls, in cifs_query_path_info() 559 cifs_remap(cifs_sb)); in cifs_query_path_info() 566 rc = SMBQueryInformation(xid, tcon, full_path, &fi, cifs_sb->local_nls, in cifs_query_path_info() 567 cifs_remap(cifs_sb)); in cifs_query_path_info() [all …]
|
D | connect.c | 2760 struct cifs_sb_info *new = mnt_data->cifs_sb; in compare_mount_options() 2810 struct cifs_sb_info *new = mnt_data->cifs_sb; in match_prepath() 2833 struct cifs_sb_info *cifs_sb; in cifs_match_super() local 2841 cifs_sb = CIFS_SB(sb); in cifs_match_super() 2844 if (CIFS_MOUNT_SHUTDOWN & cifs_sb->mnt_cifs_flags) { in cifs_match_super() 2849 tlink = cifs_get_tlink(cifs_sb_master_tlink(cifs_sb)); in cifs_match_super() 3145 struct cifs_sb_info *cifs_sb, struct smb3_fs_context *ctx) in reset_cifs_unix_caps() argument 3205 if (cifs_sb) in reset_cifs_unix_caps() 3206 cifs_sb->mnt_cifs_flags |= in reset_cifs_unix_caps() 3214 if (cifs_sb) in reset_cifs_unix_caps() [all …]
|
D | cifsproto.h | 78 struct cifs_sb_info *cifs_sb, 201 struct cifs_sb_info *cifs_sb); 211 bool cifs_reparse_point_to_fattr(struct cifs_sb_info *cifs_sb, 224 extern int sid_to_id(struct cifs_sb_info *cifs_sb, struct cifs_sid *psid, 226 extern int cifs_acl_to_fattr(struct cifs_sb_info *cifs_sb, 258 extern int cifs_setup_cifs_sb(struct cifs_sb_info *cifs_sb); 264 extern int cifs_mount(struct cifs_sb_info *cifs_sb, struct smb3_fs_context *ctx); 330 const char *searchName, struct cifs_sb_info *cifs_sb, 372 struct cifs_sb_info *cifs_sb, 391 struct cifs_sb_info *cifs_sb); [all …]
|
D | xattr.c | 100 struct cifs_sb_info *cifs_sb = CIFS_SB(sb); in cifs_xattr_set() local 106 tlink = cifs_sb_tlink(cifs_sb); in cifs_xattr_set() 150 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR) in cifs_xattr_set() 156 cifs_sb->local_nls, cifs_sb); in cifs_xattr_set() 268 struct cifs_sb_info *cifs_sb = CIFS_SB(sb); in cifs_xattr_get() local 274 tlink = cifs_sb_tlink(cifs_sb); in cifs_xattr_get() 302 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR) in cifs_xattr_get() 307 full_path, name, value, size, cifs_sb); in cifs_xattr_get() 328 pacl = pTcon->ses->server->ops->get_acl(cifs_sb, in cifs_xattr_get() 367 struct cifs_sb_info *cifs_sb = CIFS_SB(direntry->d_sb); in cifs_listxattr() local [all …]
|
D | smb2proto.h | 30 struct cifs_sb_info *cifs_sb); 57 struct cifs_sb_info *cifs_sb, const char *path, 61 struct cifs_sb_info *cifs_sb, 66 struct cifs_sb_info *cifs_sb, bool set_alloc); 72 struct cifs_sb_info *cifs_sb); 75 const char *name, struct cifs_sb_info *cifs_sb); 77 struct cifs_sb_info *cifs_sb, 80 const char *name, struct cifs_sb_info *cifs_sb); 82 const char *name, struct cifs_sb_info *cifs_sb); 87 struct cifs_sb_info *cifs_sb); [all …]
|
D | misc.c | 539 cifs_autodisable_serverino(struct cifs_sb_info *cifs_sb) in cifs_autodisable_serverino() argument 541 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) { in cifs_autodisable_serverino() 544 if (cifs_sb->master_tlink) in cifs_autodisable_serverino() 545 tcon = cifs_sb_master_tcon(cifs_sb); in cifs_autodisable_serverino() 547 cifs_sb->mnt_cifs_flags &= ~CIFS_MOUNT_SERVER_INUM; in cifs_autodisable_serverino() 548 cifs_sb->mnt_cifs_serverino_autodisabled = true; in cifs_autodisable_serverino() 646 backup_cred(struct cifs_sb_info *cifs_sb) in backup_cred() argument 648 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_BACKUPUID) { in backup_cred() 649 if (uid_eq(cifs_sb->ctx->backupuid, current_fsuid())) in backup_cred() 652 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_BACKUPGID) { in backup_cred() [all …]
|
D | cifsacl.c | 339 sid_to_id(struct cifs_sb_info *cifs_sb, struct cifs_sid *psid, in sid_to_id() argument 346 kuid_t fuid = cifs_sb->ctx->linux_uid; in sid_to_id() 347 kgid_t fgid = cifs_sb->ctx->linux_gid; in sid_to_id() 359 if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_UID_FROM_ACL) || in sid_to_id() 360 (cifs_sb_master_tcon(cifs_sb)->posix_extensions)) { in sid_to_id() 1193 static int parse_sec_desc(struct cifs_sb_info *cifs_sb, in parse_sec_desc() argument 1222 rc = sid_to_id(cifs_sb, owner_sid_ptr, fattr, SIDOWNER); in parse_sec_desc() 1235 rc = sid_to_id(cifs_sb, group_sid_ptr, fattr, SIDGROUP); in parse_sec_desc() 1388 struct cifs_ntsd *get_cifs_acl_by_fid(struct cifs_sb_info *cifs_sb, in get_cifs_acl_by_fid() argument 1395 struct tcon_link *tlink = cifs_sb_tlink(cifs_sb); in get_cifs_acl_by_fid() [all …]
|
D | dfs.h | 126 static inline char *dfs_get_path(struct cifs_sb_info *cifs_sb, const char *path) in dfs_get_path() argument 128 return dfs_cache_canonical_path(path, cifs_sb->local_nls, cifs_remap(cifs_sb)); in dfs_get_path() 135 struct cifs_sb_info *cifs_sb = mnt_ctx->cifs_sb; in dfs_get_referral() local 137 return dfs_cache_find(mnt_ctx->xid, ctx->dfs_root_ses, cifs_sb->local_nls, in dfs_get_referral() 138 cifs_remap(cifs_sb), path, ref, tl); in dfs_get_referral()
|
D | cached_dir.c | 67 path_to_dentry(struct cifs_sb_info *cifs_sb, const char *path) in path_to_dentry() argument 73 sep = CIFS_DIR_SEP(cifs_sb); in path_to_dentry() 74 dentry = dget(cifs_sb->root); in path_to_dentry() 104 static const char *path_no_prefix(struct cifs_sb_info *cifs_sb, in path_no_prefix() argument 112 if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_USE_PREFIX_PATH) && in path_no_prefix() 113 cifs_sb->prepath) { in path_no_prefix() 114 len = strlen(cifs_sb->prepath) + 1; in path_no_prefix() 127 struct cifs_sb_info *cifs_sb, in open_cached_dir() argument 160 if (cifs_sb->root == NULL) in open_cached_dir() 163 utf16_path = cifs_convert_path_to_utf16(path, cifs_sb); in open_cached_dir() [all …]
|
D | ioctl.c | 30 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); in cifs_ioctl_query_info() local 31 struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb); in cifs_ioctl_query_info() 50 utf16_path = cifs_convert_path_to_utf16(path + 1, cifs_sb); in cifs_ioctl_query_info() 59 xid, tcon, cifs_sb, utf16_path, in cifs_ioctl_query_info() 336 struct cifs_sb_info *cifs_sb; in cifs_ioctl() local 432 cifs_sb = CIFS_SB(inode->i_sb); in cifs_ioctl() 433 tlink = cifs_sb_tlink(cifs_sb); in cifs_ioctl() 466 cifs_sb = CIFS_SB(inode->i_sb); in cifs_ioctl() 467 tlink = cifs_sb_tlink(cifs_sb); in cifs_ioctl() 504 cifs_sb = CIFS_SB(inode->i_sb); in cifs_ioctl() [all …]
|
D | file.c | 285 struct cifs_sb_info *cifs_sb = CIFS_SB(sb); in cifs_posix_open() local 296 tlink = cifs_sb_tlink(cifs_sb); in cifs_posix_open() 307 poplock, full_path, cifs_sb->local_nls, in cifs_posix_open() 308 cifs_remap(cifs_sb)); in cifs_posix_open() 320 cifs_unix_basic_to_fattr(&fattr, presp_data, cifs_sb); in cifs_posix_open() 341 static int cifs_nt_open(const char *full_path, struct inode *inode, struct cifs_sb_info *cifs_sb, in cifs_nt_open() argument 394 .cifs_sb = cifs_sb, in cifs_nt_open() 396 .create_options = cifs_create_options(cifs_sb, create_options), in cifs_nt_open() 621 struct cifs_sb_info *cifs_sb = CIFS_SB(sb); in _cifsFileInfo_put() local 656 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_STRICT_IO) in _cifsFileInfo_put() [all …]
|
D | cached_dir.h | 67 struct cifs_sb_info *cifs_sb, 76 struct cifs_sb_info *cifs_sb); 77 extern void close_all_cached_dirs(struct cifs_sb_info *cifs_sb);
|
D | namespace.c | 122 struct cifs_sb_info *cifs_sb = CIFS_SB(dentry->d_sb); in is_dfs_mount() local 123 struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb); in is_dfs_mount() 135 struct cifs_sb_info *cifs_sb = CIFS_SB(dentry->d_sb); in automount_fullpath() local 136 struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb); in automount_fullpath()
|
D | smb2ops.c | 806 struct cifs_sb_info *cifs_sb) in smb3_qfs_tcon() argument 820 .create_options = cifs_create_options(cifs_sb, 0), in smb3_qfs_tcon() 824 rc = open_cached_dir(xid, tcon, "", cifs_sb, false, &cfid); in smb3_qfs_tcon() 851 struct cifs_sb_info *cifs_sb) in smb2_qfs_tcon() argument 864 .create_options = cifs_create_options(cifs_sb, 0), in smb2_qfs_tcon() 882 struct cifs_sb_info *cifs_sb, const char *full_path) in smb2_is_path_accessible() argument 894 rc = open_cached_dir(xid, tcon, full_path, cifs_sb, true, &cfid); in smb2_is_path_accessible() 903 utf16_path = cifs_convert_path_to_utf16(full_path, cifs_sb); in smb2_is_path_accessible() 912 .create_options = cifs_create_options(cifs_sb, 0), in smb2_is_path_accessible() 925 rc2 = cifs_inval_name_dfs_link_error(xid, tcon, cifs_sb, in smb2_is_path_accessible() [all …]
|
D | cifsglob.h | 348 struct cifs_sb_info *cifs_sb, 357 struct cifs_sb_info *cifs_sb, 363 struct cifs_sb_info *cifs_sb, const char *full_path, u64 *uniqueid, 384 struct cifs_sb_info *cifs_sb); 406 struct cifs_sb_info *cifs_sb); 412 struct cifs_sb_info *cifs_sb); 416 struct cifs_sb_info *cifs_sb, 554 struct cifs_sb_info *cifs_sb, 574 int (*parse_reparse_point)(struct cifs_sb_info *cifs_sb, 632 struct cifs_sb_info *cifs_sb; member [all …]
|
D | smb2file.c | 66 int smb2_parse_symlink_response(struct cifs_sb_info *cifs_sb, const struct kvec *iov, char **path) in smb2_parse_symlink_response() argument 73 if (!cifs_sb || !iov || !iov->iov_base || !iov->iov_len || !path) in smb2_parse_symlink_response() 90 cifs_sb->local_nls); in smb2_parse_symlink_response() 113 smb2_path = cifs_convert_path_to_utf16(oparms->path, oparms->cifs_sb); in smb2_open_file() 128 rc = smb2_parse_symlink_response(oparms->cifs_sb, &err_iov, in smb2_open_file()
|
D | cifssmb.c | 741 struct cifs_sb_info *cifs_sb) in CIFSSMBDelFile() argument 748 int remap = cifs_remap(cifs_sb); in CIFSSMBDelFile() 758 PATH_MAX, cifs_sb->local_nls, in CIFSSMBDelFile() 785 struct cifs_sb_info *cifs_sb) in CIFSSMBRmDir() argument 792 int remap = cifs_remap(cifs_sb); in CIFSSMBRmDir() 803 PATH_MAX, cifs_sb->local_nls, in CIFSSMBRmDir() 829 struct cifs_sb_info *cifs_sb) in CIFSSMBMkDir() argument 836 int remap = cifs_remap(cifs_sb); in CIFSSMBMkDir() 847 PATH_MAX, cifs_sb->local_nls, in CIFSSMBMkDir() 1150 struct cifs_sb_info *cifs_sb = oparms->cifs_sb; in CIFS_open() local [all …]
|