From: Jeremy Allison Date: Thu, 21 Feb 2008 06:10:54 +0000 (-0800) Subject: From: David Disseldorp X-Git-Tag: samba-4.0.0alpha6~801^2~3573^2~237^2~8 X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=94ed19c4a89003cb53c9dcfd068246806028e038;p=samba.git From: David Disseldorp The vfs_prealloc module makes use of the now redundant fd parameter for SMB_VFS_FTRUNCATE(), instead get the fd from the files_struct. Patch for Samba 3.2 Test branch below. Cheers, David D (This used to be commit d9b72282c63b57c8e54131306b2a3028a1ea41dc) --- diff --git a/source3/modules/vfs_prealloc.c b/source3/modules/vfs_prealloc.c index cb3508dc30f..2a06e3d81bd 100644 --- a/source3/modules/vfs_prealloc.c +++ b/source3/modules/vfs_prealloc.c @@ -199,7 +199,7 @@ static int prealloc_ftruncate(vfs_handle_struct * handle, /* Maintain the allocated space even in the face of truncates. */ if ((psize = VFS_FETCH_FSP_EXTENSION(handle, fsp))) { - preallocate_space(fd, *psize); + preallocate_space(fsp->fh->fd, *psize); } return ret; @@ -218,4 +218,3 @@ NTSTATUS vfs_prealloc_init(void) return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, MODULE, prealloc_op_tuples); } -