From a32754589a05038423582a16f6468fbd783daed6 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 12 Nov 2001 02:03:44 +0000 Subject: Don't check space on every extend if strict allocate not set. Jeremy (This used to be commit 9391efb38ef1847ed2c3b2734c1177830d64a247) --- source3/smbd/vfs.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'source3/smbd') diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c index 256fb96f02..6d8e9cc76c 100644 --- a/source3/smbd/vfs.c +++ b/source3/smbd/vfs.c @@ -311,11 +311,6 @@ int vfs_allocate_file_space(files_struct *fsp, SMB_OFF_T len) SMB_OFF_T space_avail; SMB_BIG_UINT bsize,dfree,dsize; -#if 0 - if (!lp_strict_allocate(SNUM(fsp->conn))) - return vfs_set_filelen(fsp, len); -#endif - release_level_2_oplocks_on_change(fsp); /* @@ -345,6 +340,9 @@ int vfs_allocate_file_space(files_struct *fsp, SMB_OFF_T len) /* Grow - we need to test if we have enough space. */ + if (!lp_strict_allocate(SNUM(fsp->conn))) + return 0; + len -= st.st_size; len /= 1024; /* Len is now number of 1k blocks needed. */ space_avail = (SMB_OFF_T)conn->vfs_ops.disk_free(conn,fsp->fsp_name,False,&bsize,&dfree,&dsize); -- cgit