Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 169198
b: refs/heads/master
c: 2ec4650
h: refs/heads/master
v: v3
  • Loading branch information
Steven Whitehouse committed Dec 3, 2009
1 parent 6fa8502 commit a44d82c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 86e931a35e93d94e6e91b57cc76456e16d188ea9
refs/heads/master: 2ec4650526c5a94d96bb760001fe0685b15988de
10 changes: 9 additions & 1 deletion trunk/fs/gfs2/quota.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#include <linux/gfs2_ondisk.h>
#include <linux/kthread.h>
#include <linux/freezer.h>
#include <linux/quota.h>
#include <linux/dqblk_xfs.h>

#include "gfs2.h"
Expand Down Expand Up @@ -1001,7 +1002,7 @@ static int print_message(struct gfs2_quota_data *qd, char *type)
{
struct gfs2_sbd *sdp = qd->qd_gl->gl_sbd;

printk(KERN_INFO "GFS2: fsid=%s: quota %s for %s %u\r\n",
printk(KERN_INFO "GFS2: fsid=%s: quota %s for %s %u\n",
sdp->sd_fsname, type,
(test_bit(QDF_USER, &qd->qd_flags)) ? "user" : "group",
qd->qd_id);
Expand Down Expand Up @@ -1038,13 +1039,20 @@ int gfs2_quota_check(struct gfs2_inode *ip, u32 uid, u32 gid)

if (be64_to_cpu(qd->qd_qb.qb_limit) && (s64)be64_to_cpu(qd->qd_qb.qb_limit) < value) {
print_message(qd, "exceeded");
quota_send_warning(test_bit(QDF_USER, &qd->qd_flags) ?
USRQUOTA : GRPQUOTA, qd->qd_id,
sdp->sd_vfs->s_dev, QUOTA_NL_BHARDWARN);

error = -EDQUOT;
break;
} else if (be64_to_cpu(qd->qd_qb.qb_warn) &&
(s64)be64_to_cpu(qd->qd_qb.qb_warn) < value &&
time_after_eq(jiffies, qd->qd_last_warn +
gfs2_tune_get(sdp,
gt_quota_warn_period) * HZ)) {
quota_send_warning(test_bit(QDF_USER, &qd->qd_flags) ?
USRQUOTA : GRPQUOTA, qd->qd_id,
sdp->sd_vfs->s_dev, QUOTA_NL_BSOFTWARN);
error = print_message(qd, "warning");
qd->qd_last_warn = jiffies;
}
Expand Down

0 comments on commit a44d82c

Please sign in to comment.