[SCM] Samba Shared Repository - branch master updated

Björn Jacke bjacke at samba.org
Wed Dec 2 18:34:45 MST 2009


The branch, master has been updated
       via  7c938d1... Ñ•3: remove superfluous option check
      from  48358b3... s4/torture: add multiple lock cancel test

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 7c938d16a9cf4daa1d4a61399f326f2683d08af4
Author: Björn Jacke <bj at sernet.de>
Date:   Thu Dec 3 02:32:47 2009 +0100

    Ñ•3: remove superfluous option check
    
    this function is only called when strict alloc is set, no reason to check that twice.

-----------------------------------------------------------------------

Summary of changes:
 source3/modules/vfs_default.c |   23 ++++++++++-------------
 1 files changed, 10 insertions(+), 13 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index da775d1..3691fb0 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -915,6 +915,8 @@ static int strict_allocate_ftruncate(vfs_handle_struct *handle, files_struct *fs
 	SMB_OFF_T currpos = SMB_VFS_LSEEK(fsp, 0, SEEK_CUR);
 	unsigned char zero_space[4096];
 	SMB_OFF_T space_to_write;
+	uint64_t space_avail;
+	uint64_t bsize,dfree,dsize;
 
 	if (currpos == -1)
 		return -1;
@@ -956,19 +958,14 @@ static int strict_allocate_ftruncate(vfs_handle_struct *handle, files_struct *fs
 #endif
 	/* available disk space is enough or not? */
 	space_to_write = len - st.st_ex_size;
-	if (lp_strict_allocate(SNUM(fsp->conn))){
-		uint64_t space_avail;
-		uint64_t bsize,dfree,dsize;
-
-		space_avail = get_dfree_info(fsp->conn,
-					     fsp->fsp_name->base_name, false,
-					     &bsize, &dfree, &dsize);
-		/* space_avail is 1k blocks */
-		if (space_avail == (uint64_t)-1 ||
-				((uint64_t)space_to_write/1024 > space_avail) ) {
-			errno = ENOSPC;
-			return -1;
-		}
+	space_avail = get_dfree_info(fsp->conn,
+				     fsp->fsp_name->base_name, false,
+				     &bsize,&dfree,&dsize);
+	/* space_avail is 1k blocks */
+	if (space_avail == (uint64_t)-1 ||
+			((uint64_t)space_to_write/1024 > space_avail) ) {
+		errno = ENOSPC;
+		return -1;
 	}
 
 	/* Write out the real space on disk. */


-- 
Samba Shared Repository


More information about the samba-cvs mailing list