@@ -2249,7 +2249,7 @@ static int smb2_set_ea(struct smb2_ea_info *eabuf, unsigned int buf_len,
2249
2249
/* delete the EA only when it exits */
2250
2250
if (rc > 0 ) {
2251
2251
rc = ksmbd_vfs_remove_xattr (idmap ,
2252
- path -> dentry ,
2252
+ path ,
2253
2253
attr_name );
2254
2254
2255
2255
if (rc < 0 ) {
@@ -2263,8 +2263,7 @@ static int smb2_set_ea(struct smb2_ea_info *eabuf, unsigned int buf_len,
2263
2263
/* if the EA doesn't exist, just do nothing. */
2264
2264
rc = 0 ;
2265
2265
} else {
2266
- rc = ksmbd_vfs_setxattr (idmap ,
2267
- path -> dentry , attr_name , value ,
2266
+ rc = ksmbd_vfs_setxattr (idmap , path , attr_name , value ,
2268
2267
le16_to_cpu (eabuf -> EaValueLength ), 0 );
2269
2268
if (rc < 0 ) {
2270
2269
ksmbd_debug (SMB ,
@@ -2321,8 +2320,7 @@ static noinline int smb2_set_stream_name_xattr(const struct path *path,
2321
2320
return - EBADF ;
2322
2321
}
2323
2322
2324
- rc = ksmbd_vfs_setxattr (idmap , path -> dentry ,
2325
- xattr_stream_name , NULL , 0 , 0 );
2323
+ rc = ksmbd_vfs_setxattr (idmap , path , xattr_stream_name , NULL , 0 , 0 );
2326
2324
if (rc < 0 )
2327
2325
pr_err ("Failed to store XATTR stream name :%d\n" , rc );
2328
2326
return 0 ;
@@ -2350,7 +2348,7 @@ static int smb2_remove_smb_xattrs(const struct path *path)
2350
2348
if (!strncmp (name , XATTR_USER_PREFIX , XATTR_USER_PREFIX_LEN ) &&
2351
2349
!strncmp (& name [XATTR_USER_PREFIX_LEN ], STREAM_PREFIX ,
2352
2350
STREAM_PREFIX_LEN )) {
2353
- err = ksmbd_vfs_remove_xattr (idmap , path -> dentry ,
2351
+ err = ksmbd_vfs_remove_xattr (idmap , path ,
2354
2352
name );
2355
2353
if (err )
2356
2354
ksmbd_debug (SMB , "remove xattr failed : %s\n" ,
@@ -2397,8 +2395,7 @@ static void smb2_new_xattrs(struct ksmbd_tree_connect *tcon, const struct path *
2397
2395
da .flags = XATTR_DOSINFO_ATTRIB | XATTR_DOSINFO_CREATE_TIME |
2398
2396
XATTR_DOSINFO_ITIME ;
2399
2397
2400
- rc = ksmbd_vfs_set_dos_attrib_xattr (mnt_idmap (path -> mnt ),
2401
- path -> dentry , & da );
2398
+ rc = ksmbd_vfs_set_dos_attrib_xattr (mnt_idmap (path -> mnt ), path , & da );
2402
2399
if (rc )
2403
2400
ksmbd_debug (SMB , "failed to store file attribute into xattr\n" );
2404
2401
}
@@ -2972,7 +2969,7 @@ int smb2_open(struct ksmbd_work *work)
2972
2969
struct inode * inode = d_inode (path .dentry );
2973
2970
2974
2971
posix_acl_rc = ksmbd_vfs_inherit_posix_acl (idmap ,
2975
- path . dentry ,
2972
+ & path ,
2976
2973
d_inode (path .dentry -> d_parent ));
2977
2974
if (posix_acl_rc )
2978
2975
ksmbd_debug (SMB , "inherit posix acl failed : %d\n" , posix_acl_rc );
@@ -2988,7 +2985,7 @@ int smb2_open(struct ksmbd_work *work)
2988
2985
if (rc ) {
2989
2986
if (posix_acl_rc )
2990
2987
ksmbd_vfs_set_init_posix_acl (idmap ,
2991
- path . dentry );
2988
+ & path );
2992
2989
2993
2990
if (test_share_config_flag (work -> tcon -> share_conf ,
2994
2991
KSMBD_SHARE_FLAG_ACL_XATTR )) {
@@ -3028,7 +3025,7 @@ int smb2_open(struct ksmbd_work *work)
3028
3025
3029
3026
rc = ksmbd_vfs_set_sd_xattr (conn ,
3030
3027
idmap ,
3031
- path . dentry ,
3028
+ & path ,
3032
3029
pntsd ,
3033
3030
pntsd_size );
3034
3031
kfree (pntsd );
@@ -5464,7 +5461,7 @@ static int smb2_rename(struct ksmbd_work *work,
5464
5461
goto out ;
5465
5462
5466
5463
rc = ksmbd_vfs_setxattr (file_mnt_idmap (fp -> filp ),
5467
- fp -> filp -> f_path . dentry ,
5464
+ & fp -> filp -> f_path ,
5468
5465
xattr_stream_name ,
5469
5466
NULL , 0 , 0 );
5470
5467
if (rc < 0 ) {
@@ -5629,8 +5626,7 @@ static int set_file_basic_info(struct ksmbd_file *fp,
5629
5626
da .flags = XATTR_DOSINFO_ATTRIB | XATTR_DOSINFO_CREATE_TIME |
5630
5627
XATTR_DOSINFO_ITIME ;
5631
5628
5632
- rc = ksmbd_vfs_set_dos_attrib_xattr (idmap ,
5633
- filp -> f_path .dentry , & da );
5629
+ rc = ksmbd_vfs_set_dos_attrib_xattr (idmap , & filp -> f_path , & da );
5634
5630
if (rc )
5635
5631
ksmbd_debug (SMB ,
5636
5632
"failed to restore file attribute in EA\n" );
@@ -7485,7 +7481,7 @@ static inline int fsctl_set_sparse(struct ksmbd_work *work, u64 id,
7485
7481
7486
7482
da .attr = le32_to_cpu (fp -> f_ci -> m_fattr );
7487
7483
ret = ksmbd_vfs_set_dos_attrib_xattr (idmap ,
7488
- fp -> filp -> f_path . dentry , & da );
7484
+ & fp -> filp -> f_path , & da );
7489
7485
if (ret )
7490
7486
fp -> f_ci -> m_fattr = old_fattr ;
7491
7487
}
0 commit comments