summaryrefslogtreecommitdiff
path: root/fs/smb/client/cifsfs.c
diff options
context:
space:
mode:
authorHenrique Carvalho <henrique.carvalho@suse.com>2024-11-12 16:48:09 -0300
committerEnzo Matsumiya <ematsumiya@suse.de>2024-11-13 15:49:46 -0300
commit472697f67cf64a2461ad1842927f3c8cc539f37e (patch)
tree37bb1e46b0884721d35eb5d902aaf1bcf88374b0 /fs/smb/client/cifsfs.c
parent8e5cdf186897806453d95697985d2eb21a4730a7 (diff)
downloadlinux-hw24-hc-wip.tar.gz
linux-hw24-hc-wip.tar.bz2
linux-hw24-hc-wip.zip
smb: client: replace function pointers of common operations for thehw24-hc-wip
common function Signed-off-by: Henrique Carvalho <henrique.carvalho@suse.com>
Diffstat (limited to 'fs/smb/client/cifsfs.c')
-rw-r--r--fs/smb/client/cifsfs.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/fs/smb/client/cifsfs.c b/fs/smb/client/cifsfs.c
index 49e2e2bf45e6..c6f517099eea 100644
--- a/fs/smb/client/cifsfs.c
+++ b/fs/smb/client/cifsfs.c
@@ -1016,9 +1016,7 @@ static loff_t cifs_llseek(struct file *file, loff_t offset, int whence)
}
if (cfile && cfile->tlink) {
tcon = tlink_tcon(cfile->tlink);
- if (tcon->ses->server->ops->llseek)
- return tcon->ses->server->ops->llseek(file, tcon,
- offset, whence);
+ return smb3_llseek(file, tcon, offset, whence);
}
return generic_file_llseek(file, offset, whence);
}
@@ -1149,12 +1147,8 @@ static int cifs_precopy_set_eof(struct inode *src_inode, struct cifsInodeInfo *s
writeable_srcfile = find_writable_file(src_cifsi, FIND_WR_FSUID_ONLY);
if (writeable_srcfile) {
- if (src_tcon->ses->server->ops->set_file_size)
- rc = src_tcon->ses->server->ops->set_file_size(
- xid, src_tcon, writeable_srcfile,
- src_inode->i_size, true /* no need to set sparse */);
- else
- rc = -ENOSYS;
+ rc = smb2_set_file_size(xid, src_tcon, writeable_srcfile, src_inode->i_size,
+ true /* no need to set sparse */);
cifsFileInfo_put(writeable_srcfile);
cifs_dbg(FYI, "SetFSize for copychunk rc = %d\n", rc);
}
@@ -1349,10 +1343,6 @@ ssize_t cifs_file_copychunk_range(unsigned int xid,
goto out;
}
- rc = -EOPNOTSUPP;
- if (!target_tcon->ses->server->ops->copychunk_range)
- goto out;
-
/*
* Note: cifs case is easier than btrfs since server responsible for
* checks for proper open modes and file type and if it wants
@@ -1390,8 +1380,7 @@ ssize_t cifs_file_copychunk_range(unsigned int xid,
rc = file_modified(dst_file);
if (!rc) {
- rc = target_tcon->ses->server->ops->copychunk_range(xid,
- smb_file_src, smb_file_target, off, len, destoff);
+ rc = smb2_copychunk_range(xid, smb_file_src, smb_file_target, off, len, destoff);
if (rc > 0 && destoff + rc > i_size_read(target_inode)) {
truncate_setsize(target_inode, destoff + rc);
netfs_resize_file(&target_cifsi->netfs,
@@ -1446,8 +1435,7 @@ static ssize_t cifs_copy_file_range(struct file *src_file, loff_t off,
return rc;
}
- rc = cifs_file_copychunk_range(xid, src_file, off, dst_file, destoff,
- len, flags);
+ rc = cifs_file_copychunk_range(xid, src_file, off, dst_file, destoff, len, flags);
free_xid(xid);
if (rc == -EOPNOTSUPP || rc == -EXDEV)