]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_ceph_new: Reduce a level of indirection for SMB_VFS_FSTATVFS
authorAnoop C S <anoopcs@samba.org>
Tue, 17 Feb 2026 16:21:35 +0000 (21:51 +0530)
committerVolker Lendecke <vl@samba.org>
Wed, 18 Feb 2026 11:12:23 +0000 (11:12 +0000)
Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Feb 18 11:12:23 UTC 2026 on atb-devel-224

source3/modules/vfs_ceph_new.c

index 138b8e51efa7d83fa73127acec0891565960cb00..eafce7b30ce820a4c3ed5f42a8b6f1ca61f48db7 100644 (file)
@@ -2493,16 +2493,16 @@ out:
        return ret;
 }
 
-static int vfs_ceph_statvfs(struct vfs_handle_struct *handle,
-                           const struct smb_filename *smb_fname,
-                           struct vfs_statvfs_struct *statbuf)
+static int vfs_ceph_fstatvfs(struct vfs_handle_struct *handle,
+                            struct files_struct *fsp,
+                            struct vfs_statvfs_struct *statbuf)
 {
        struct statvfs statvfs_buf = { 0 };
-       struct vfs_ceph_iref iref = {0};
+       struct vfs_ceph_iref iref = { 0 };
        uint32_t caps = 0;
        int ret;
 
-       ret = vfs_ceph_iget(handle, smb_fname->base_name, 0, &iref);
+       ret = vfs_ceph_iget(handle, fsp->fsp_name->base_name, 0, &iref);
        if (ret != 0) {
                goto out;
        }
@@ -2527,9 +2527,9 @@ static int vfs_ceph_statvfs(struct vfs_handle_struct *handle,
        statbuf->FsIdentifier = statvfs_buf.f_fsid;
        statbuf->FsCapabilities = caps;
 
-       DBG_DEBUG("[CEPH] statvfs: name=%s f_bsize=%ld f_blocks=%ld "
+       DBG_DEBUG("[CEPH] fstatvfs: name=%s f_bsize=%ld f_blocks=%ld "
                  "f_bfree=%ld f_bavail=%ld\n",
-                 smb_fname->base_name,
+                 fsp->fsp_name->base_name,
                  (long int)statvfs_buf.f_bsize,
                  (long int)statvfs_buf.f_blocks,
                  (long int)statvfs_buf.f_bfree,
@@ -2539,13 +2539,6 @@ out:
        return status_code(ret);
 }
 
-static int vfs_ceph_fstatvfs(struct vfs_handle_struct *handle,
-                            struct files_struct *fsp,
-                            struct vfs_statvfs_struct *statbuf)
-{
-       return vfs_ceph_statvfs(handle, fsp->fsp_name, statbuf);
-}
-
 static uint32_t vfs_ceph_fs_capabilities(
        struct vfs_handle_struct *handle,
        enum timestamp_set_resolution *p_ts_res)