Source
95
95
96
96
static void do_acct_process(struct bsd_acct_struct *acct);
97
97
98
98
/*
99
99
* Check the amount of free space and suspend/resume accordingly.
100
100
*/
101
101
static int check_free_space(struct bsd_acct_struct *acct)
102
102
{
103
103
struct kstatfs sbuf;
104
104
105
-
if (time_is_before_jiffies(acct->needcheck))
105
+
if (time_is_after_jiffies(acct->needcheck))
106
106
goto out;
107
107
108
108
/* May block */
109
109
if (vfs_statfs(&acct->file->f_path, &sbuf))
110
110
goto out;
111
111
112
112
if (acct->active) {
113
113
u64 suspend = sbuf.f_blocks * SUSPEND;
114
114
do_div(suspend, 100);
115
115
if (sbuf.f_bavail <= suspend) {