summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
authorChristof Schmitt <christof.schmitt@us.ibm.com>2012-06-18 16:13:06 -0700
committerChristian Ambach <ambi@samba.org>2012-07-11 19:38:47 +0200
commit35ab9bea0f15d66a6b0e827804e1fc66192d0068 (patch)
tree36c0497d3de76367f1cab36c02d42d27970beda1 /source3/modules
parent149cae84285b0e7076deaf993d381317fb2eadf5 (diff)
downloadsamba-35ab9bea0f15d66a6b0e827804e1fc66192d0068.tar.gz
samba-35ab9bea0f15d66a6b0e827804e1fc66192d0068.tar.bz2
samba-35ab9bea0f15d66a6b0e827804e1fc66192d0068.zip
s3:vfs_gpfs: Check softquota before gracetime
gpfs_quotactl can return a non-zero softquota gracetime even when no softquota has been set. This could lead to "disk full" being reported to a client. The easiest fix is to check for a valid softquota before checking the softquota gracetime.
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_gpfs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index a165cfadd8..ddd048acc0 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -1562,7 +1562,8 @@ static void vfs_gpfs_disk_free_quota(struct gpfs_quotaInfo qi, time_t cur_time,
* When the grace time for the exceeded soft block quota has been
* exceeded, the soft block quota becomes an additional hard limit.
*/
- if (qi.blockGraceTime && cur_time > qi.blockGraceTime) {
+ if (qi.blockSoftLimit &&
+ qi.blockGraceTime && cur_time > qi.blockGraceTime) {
/* report disk as full */
*dfree = 0;
*dsize = MIN(*dsize, usage);