diff options
author | Jeremy Allison <jra@samba.org> | 2001-11-12 02:03:44 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-11-12 02:03:44 +0000 |
commit | a32754589a05038423582a16f6468fbd783daed6 (patch) | |
tree | 24c8aa58b73c77a9d97b6493bf2c243408618a6d /source3/smbd | |
parent | 25f51f49b13f46907b19761720de380513b3eec9 (diff) | |
download | samba-a32754589a05038423582a16f6468fbd783daed6.tar.gz samba-a32754589a05038423582a16f6468fbd783daed6.tar.bz2 samba-a32754589a05038423582a16f6468fbd783daed6.zip |
Don't check space on every extend if strict allocate not set.
Jeremy
(This used to be commit 9391efb38ef1847ed2c3b2734c1177830d64a247)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/vfs.c | 8 |
1 files changed, 3 insertions, 5 deletions
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); |