@@ -2249,7 +2249,7 @@ static int smb2_set_ea(struct smb2_ea_info *eabuf, unsigned int buf_len,
22492249 /* delete the EA only when it exits */
22502250 if (rc > 0 ) {
22512251 rc = ksmbd_vfs_remove_xattr (idmap ,
2252- path -> dentry ,
2252+ path ,
22532253 attr_name );
22542254
22552255 if (rc < 0 ) {
@@ -2263,8 +2263,7 @@ static int smb2_set_ea(struct smb2_ea_info *eabuf, unsigned int buf_len,
22632263 /* if the EA doesn't exist, just do nothing. */
22642264 rc = 0 ;
22652265 } else {
2266- rc = ksmbd_vfs_setxattr (idmap ,
2267- path -> dentry , attr_name , value ,
2266+ rc = ksmbd_vfs_setxattr (idmap , path , attr_name , value ,
22682267 le16_to_cpu (eabuf -> EaValueLength ), 0 );
22692268 if (rc < 0 ) {
22702269 ksmbd_debug (SMB ,
@@ -2321,8 +2320,7 @@ static noinline int smb2_set_stream_name_xattr(const struct path *path,
23212320 return - EBADF ;
23222321 }
23232322
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 );
23262324 if (rc < 0 )
23272325 pr_err ("Failed to store XATTR stream name :%d\n" , rc );
23282326 return 0 ;
@@ -2350,7 +2348,7 @@ static int smb2_remove_smb_xattrs(const struct path *path)
23502348 if (!strncmp (name , XATTR_USER_PREFIX , XATTR_USER_PREFIX_LEN ) &&
23512349 !strncmp (& name [XATTR_USER_PREFIX_LEN ], STREAM_PREFIX ,
23522350 STREAM_PREFIX_LEN )) {
2353- err = ksmbd_vfs_remove_xattr (idmap , path -> dentry ,
2351+ err = ksmbd_vfs_remove_xattr (idmap , path ,
23542352 name );
23552353 if (err )
23562354 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 *
23972395 da .flags = XATTR_DOSINFO_ATTRIB | XATTR_DOSINFO_CREATE_TIME |
23982396 XATTR_DOSINFO_ITIME ;
23992397
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 );
24022399 if (rc )
24032400 ksmbd_debug (SMB , "failed to store file attribute into xattr\n" );
24042401}
@@ -2972,7 +2969,7 @@ int smb2_open(struct ksmbd_work *work)
29722969 struct inode * inode = d_inode (path .dentry );
29732970
29742971 posix_acl_rc = ksmbd_vfs_inherit_posix_acl (idmap ,
2975- path . dentry ,
2972+ & path ,
29762973 d_inode (path .dentry -> d_parent ));
29772974 if (posix_acl_rc )
29782975 ksmbd_debug (SMB , "inherit posix acl failed : %d\n" , posix_acl_rc );
@@ -2988,7 +2985,7 @@ int smb2_open(struct ksmbd_work *work)
29882985 if (rc ) {
29892986 if (posix_acl_rc )
29902987 ksmbd_vfs_set_init_posix_acl (idmap ,
2991- path . dentry );
2988+ & path );
29922989
29932990 if (test_share_config_flag (work -> tcon -> share_conf ,
29942991 KSMBD_SHARE_FLAG_ACL_XATTR )) {
@@ -3028,7 +3025,7 @@ int smb2_open(struct ksmbd_work *work)
30283025
30293026 rc = ksmbd_vfs_set_sd_xattr (conn ,
30303027 idmap ,
3031- path . dentry ,
3028+ & path ,
30323029 pntsd ,
30333030 pntsd_size );
30343031 kfree (pntsd );
@@ -5464,7 +5461,7 @@ static int smb2_rename(struct ksmbd_work *work,
54645461 goto out ;
54655462
54665463 rc = ksmbd_vfs_setxattr (file_mnt_idmap (fp -> filp ),
5467- fp -> filp -> f_path . dentry ,
5464+ & fp -> filp -> f_path ,
54685465 xattr_stream_name ,
54695466 NULL , 0 , 0 );
54705467 if (rc < 0 ) {
@@ -5629,8 +5626,7 @@ static int set_file_basic_info(struct ksmbd_file *fp,
56295626 da .flags = XATTR_DOSINFO_ATTRIB | XATTR_DOSINFO_CREATE_TIME |
56305627 XATTR_DOSINFO_ITIME ;
56315628
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 );
56345630 if (rc )
56355631 ksmbd_debug (SMB ,
56365632 "failed to restore file attribute in EA\n" );
@@ -7485,7 +7481,7 @@ static inline int fsctl_set_sparse(struct ksmbd_work *work, u64 id,
74857481
74867482 da .attr = le32_to_cpu (fp -> f_ci -> m_fattr );
74877483 ret = ksmbd_vfs_set_dos_attrib_xattr (idmap ,
7488- fp -> filp -> f_path . dentry , & da );
7484+ & fp -> filp -> f_path , & da );
74897485 if (ret )
74907486 fp -> f_ci -> m_fattr = old_fattr ;
74917487 }
0 commit comments