summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra G <rgowdapp@redhat.com>2013-08-29 07:50:39 +0530
committerRaghavendra G <rgowdapp@redhat.com>2013-09-03 10:28:05 +0530
commita9d361e80106a4913d141e90b02a17dfc4290d1c (patch)
treebd1efcdb53d40faa91f71dbd17ae0752680e40c8
parenta8d033f4b4430aea3b9f286be98bcbfe49add69a (diff)
features/quota: log only if soft limit is set.
Change-Id: I60f93727f04f1d16edfc7efdcb4e1c501ec760fa BUG: 969461 Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
-rw-r--r--xlators/features/quota/src/quota.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c
index 9cb1bc20..769fb880 100644
--- a/xlators/features/quota/src/quota.c
+++ b/xlators/features/quota/src/quota.c
@@ -3567,9 +3567,9 @@ quota_log_usage (xlator_t *this, quota_inode_ctx_t *ctx, inode_t *inode,
priv = this->private;
cur_size = ctx->size + delta;
-
- if (timerisset (&ctx->prev_log) &&
- !quota_timeout (&ctx->prev_log, priv->log_timeout)) {
+ if ((ctx->soft_lim <= 0) || (timerisset (&ctx->prev_log) &&
+ !quota_timeout (&ctx->prev_log,
+ priv->log_timeout))) {
return;
}