From: David Disseldorp <ddiss@sgi.com>
authorJeremy Allison <jra@samba.org>
Thu, 21 Feb 2008 06:10:54 +0000 (22:10 -0800)
committerJeremy Allison <jra@samba.org>
Thu, 21 Feb 2008 06:10:54 +0000 (22:10 -0800)
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

source/modules/vfs_prealloc.c

index cb3508dc30f7dd291759c34854fb932cb764122a..2a06e3d81bd5b7ae84a6520efeb3eb3d6e6dc6e8 100644 (file)
@@ -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);
 }
-