summaryrefslogtreecommitdiffstats
path: root/source/smbd/vfs.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-03-16 02:11:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:56:04 -0500
commit19e017a78a90aca5f2d39a3c28472b9a595acbf3 (patch)
treefae6ca09c4cbf34e2900c1a13545fb8d9675e9c9 /source/smbd/vfs.c
parentb5d31b2caf5c4739607bf57cb7e4e0569b57012b (diff)
downloadsamba-19e017a78a90aca5f2d39a3c28472b9a595acbf3.tar.gz
samba-19e017a78a90aca5f2d39a3c28472b9a595acbf3.tar.xz
samba-19e017a78a90aca5f2d39a3c28472b9a595acbf3.zip
r5825: Fix one more DISK_FREE call - spotted by Ying Li <ying.li2@hp.com>.
Jeremy.
Diffstat (limited to 'source/smbd/vfs.c')
-rw-r--r--source/smbd/vfs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/smbd/vfs.c b/source/smbd/vfs.c
index e170a71520c..34671b8efc6 100644
--- a/source/smbd/vfs.c
+++ b/source/smbd/vfs.c
@@ -552,6 +552,9 @@ int vfs_allocate_file_space(files_struct *fsp, SMB_BIG_UINT len)
len -= st.st_size;
len /= 1024; /* Len is now number of 1k blocks needed. */
space_avail = SMB_VFS_DISK_FREE(conn,fsp->fsp_name,False,&bsize,&dfree,&dsize);
+ if (space_avail == (SMB_BIG_UINT)-1) {
+ return -1;
+ }
DEBUG(10,("vfs_allocate_file_space: file %s, grow. Current size %.0f, needed blocks = %.0f, space avail = %.0f\n",
fsp->fsp_name, (double)st.st_size, (double)len, (double)space_avail ));