From 35ab9bea0f15d66a6b0e827804e1fc66192d0068 Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Mon, 18 Jun 2012 16:13:06 -0700 Subject: [PATCH] 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. --- source3/modules/vfs_gpfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index a165cfadd84..ddd048acc06 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); -- 2.11.4.GIT