On Sun 26-10-14 13:22:51, Li Xi wrote:
> This patch adds mount options for enabling/disabling project quota
> accounting and enforcement. A new specific inode is also used for
> project quota accounting.
  The patch looks good except for one small issue:

...
> +     limit = dquot->dq_dqb.dqb_isoftlimit ?
> +             dquot->dq_dqb.dqb_isoftlimit :
> +             dquot->dq_dqb.dqb_ihardlimit;
> +     if (limit && buf->f_files > limit) {
> +             buf->f_files = limit;
> +             buf->f_ffree =
> +                     (buf->f_files > dquot->dq_dqb.dqb_curinodes) ?
> +                      (buf->f_ffree - dquot->dq_dqb.dqb_curinodes) : 0;
                              ^^^^^ here should be f_files, shouldn't it?

> +     }
> +
> +     spin_unlock(&dq_data_lock);
> +     dqput(dquot);
> +     return 0;
> +}
> +
>  static int ext4_statfs(struct dentry *dentry, struct kstatfs *buf)
>  {
>       struct super_block *sb = dentry->d_sb;

                                                                Honza
-- 
Jan Kara <[email protected]>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to