diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/modules/gpfs.c | 20 | ||||
-rw-r--r-- | source3/modules/vfs_gpfs.c | 2 | ||||
-rw-r--r-- | source3/modules/vfs_gpfs.h | 2 |
3 files changed, 12 insertions, 12 deletions
diff --git a/source3/modules/gpfs.c b/source3/modules/gpfs.c index eb200ff25f6..f67b38c5f0f 100644 --- a/source3/modules/gpfs.c +++ b/source3/modules/gpfs.c @@ -169,6 +169,16 @@ int gpfswrap_prealloc(int fd, gpfs_off64_t start, gpfs_off64_t bytes) return gpfs_prealloc_fn(fd, start, bytes); } +int gpfswrap_ftruncate(int fd, gpfs_off64_t length) +{ + if (gpfs_ftruncate_fn == NULL) { + errno = ENOSYS; + return -1; + } + + return gpfs_ftruncate_fn(fd, length); +} + bool set_gpfs_sharemode(files_struct *fsp, uint32 access_mask, uint32 share_access) { @@ -234,16 +244,6 @@ int set_gpfs_lease(int fd, int leasetype) return gpfswrap_set_lease(fd, gpfs_type); } -int smbd_gpfs_ftruncate(int fd, gpfs_off64_t length) -{ - if (gpfs_ftruncate_fn == NULL) { - errno = ENOSYS; - return -1; - } - - return gpfs_ftruncate_fn(fd, length); -} - int get_gpfs_quota(const char *pathname, int type, int id, struct gpfs_quotaInfo *qi) { diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index 88608039066..03cded11bc5 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -1787,7 +1787,7 @@ static int vfs_gpfs_ftruncate(vfs_handle_struct *handle, files_struct *fsp, return SMB_VFS_NEXT_FTRUNCATE(handle, fsp, len); } - result = smbd_gpfs_ftruncate(fsp->fh->fd, len); + result = gpfswrap_ftruncate(fsp->fh->fd, len); if ((result == -1) && (errno == ENOSYS)) { return SMB_VFS_NEXT_FTRUNCATE(handle, fsp, len); } diff --git a/source3/modules/vfs_gpfs.h b/source3/modules/vfs_gpfs.h index 83a4a612d92..3e040227e03 100644 --- a/source3/modules/vfs_gpfs.h +++ b/source3/modules/vfs_gpfs.h @@ -38,10 +38,10 @@ int gpfswrap_set_winattrs_path(char *pathname, int flags, int gpfswrap_get_winattrs_path(char *pathname, struct gpfs_winattr *attrs); int gpfswrap_get_winattrs(int fd, struct gpfs_winattr *attrs); int gpfswrap_prealloc(int fd, gpfs_off64_t start, gpfs_off64_t bytes); +int gpfswrap_ftruncate(int fd, gpfs_off64_t length); bool set_gpfs_sharemode(files_struct *fsp, uint32 access_mask, uint32 share_access); int set_gpfs_lease(int fd, int leasetype); -int smbd_gpfs_ftruncate(int fd, gpfs_off64_t length); int get_gpfs_quota(const char *pathname, int type, int id, struct gpfs_quotaInfo *qi); int get_gpfs_fset_id(const char *pathname, int *fset_id); |