From: Dave Chinner <david@fromorbit.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 13/17] xfs: get rid of indirections in the quotaops implementation
Date: Mon, 9 Feb 2009 13:41:15 +1100 [thread overview]
Message-ID: <20090209024115.GH8830@disturbed> (raw)
In-Reply-To: <20090126073202.961302000@bombadil.infradead.org>
On Mon, Jan 26, 2009 at 02:31:49AM -0500, Christoph Hellwig wrote:
> Currently we call from the nicely abstracted linux quotaops into a ugly
> multiplexer just to split the calls out at the same boundary again.
> Rewrite the quota ops handling to remove that obfucation.
>
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
.....
> +STATIC int
> +xfs_fs_get_xstate(
> + struct super_block *sb,
> + struct fs_quota_stat *fqs)
> +{
> + struct xfs_mount *mp = XFS_M(sb);
> +
> + if (!XFS_IS_QUOTA_RUNNING(mp))
> + return -ENOSYS;
> + return xfs_qm_scall_getqstat(mp, fqs);
The return of xfs_qm_scall_getqstat() needs to be negated.
> +STATIC int
> +xfs_fs_set_xquota(
> + struct super_block *sb,
> + int type,
> + qid_t id,
> + struct fs_disk_quota *fdq)
> +{
> + struct xfs_mount *mp = XFS_M(sb);
> +
> + if (sb->s_flags & MS_RDONLY)
> + return -EROFS;
> + if (!XFS_IS_QUOTA_RUNNING(mp))
> + return -ENOSYS;
> + if (!XFS_IS_QUOTA_ON(mp))
> + return -ESRCH;
> + if (!capable(CAP_SYS_ADMIN))
> + return -EPERM;
> +
> + return xfs_qm_scall_setqlim(mp, id, xfs_quota_type(type), fdq);
That should be negated as well.
Other than those two little things, looks good.
Reviewed-by: Dave Chinner <david@fromorbit.com>
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2009-02-09 2:41 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-26 7:31 [PATCH 00/17] 2.6.30 queue Christoph Hellwig
2009-01-26 7:31 ` [PATCH 01/17] xfs: cleanup error handling in xfs_mountfs: Christoph Hellwig
2009-01-26 21:39 ` Felix Blyakher
2009-01-26 7:31 ` [PATCH 02/17] xfs: make sure to free the real-time inodes in the mount error path Christoph Hellwig
2009-01-26 22:02 ` Felix Blyakher
2009-01-28 20:24 ` Martin Steigerwald
2009-01-26 7:31 ` [PATCH 03/17] xfs: cleanup handling in xfs_swap_extents Christoph Hellwig
2009-01-26 7:55 ` Christoph Hellwig
2009-01-27 0:27 ` [PATCH] xfs: cleanup error " Josef 'Jeff' Sipek
2009-01-28 20:25 ` Martin Steigerwald
2009-01-26 22:13 ` [PATCH 03/17] xfs: cleanup " Felix Blyakher
2009-05-08 0:45 ` Eric Sandeen
2009-01-26 7:31 ` [PATCH 04/17] xfs: tiny cleanup for xfs_link Christoph Hellwig
2009-01-26 22:23 ` Felix Blyakher
2009-01-26 7:31 ` [PATCH 05/17] xfs: remove unused XFS_MOUNT_ILOCK/XFS_MOUNT_IUNLOCK Christoph Hellwig
2009-01-26 23:43 ` Felix Blyakher
2009-01-26 7:31 ` [PATCH 06/17] xfs: remove iclog calculation special cases Christoph Hellwig
2009-02-09 2:15 ` Dave Chinner
2009-01-26 7:31 ` [PATCH 07/17] xfs: remove superflous inobt macros Christoph Hellwig
2009-02-09 2:16 ` Dave Chinner
2009-01-26 7:31 ` [PATCH 08/17] xfs: remove uchar_t/ushort_t/uint_t/ulong_t types Christoph Hellwig
2009-02-09 2:18 ` Dave Chinner
2009-01-26 7:31 ` [PATCH 09/17] xfs: cleanup xfs_find_handle Christoph Hellwig
2009-02-06 5:20 ` Felix Blyakher
2009-02-06 7:17 ` Christoph Hellwig
2009-02-06 20:31 ` Felix Blyakher
2009-01-26 7:31 ` [PATCH 10/17] xfs: factor out attr fork reset handling Christoph Hellwig
2009-01-27 16:53 ` Felix Blyakher
2009-01-26 7:31 ` [PATCH 11/17] xfs: merge xfs_inode_flush into xfs_fs_write_inode Christoph Hellwig
2009-01-27 17:37 ` Felix Blyakher
2009-02-01 0:54 ` Dave Chinner
2009-02-15 6:42 ` Dave Chinner
2009-02-15 20:13 ` Christoph Hellwig
2009-02-16 3:06 ` Dave Chinner
2009-01-26 7:31 ` [PATCH 12/17] xfs: merge xfs_mkdir into xfs_create Christoph Hellwig
2009-02-09 2:28 ` Dave Chinner
2009-01-26 7:31 ` [PATCH 13/17] xfs: get rid of indirections in the quotaops implementation Christoph Hellwig
2009-02-09 2:41 ` Dave Chinner [this message]
2009-02-09 7:46 ` Christoph Hellwig
2009-05-13 8:11 ` Christoph Hellwig
2009-01-26 7:31 ` [PATCH 14/17] xfs: remove the unused XFS_QMOPT_DQLOCK flag Christoph Hellwig
2009-02-08 0:35 ` Felix Blyakher
2009-01-26 7:31 ` [PATCH 15/17] xfs: remove XFS_QM_LOCK/XFS_QM_UNLOCK/XFS_QM_HOLD/XFS_QM_RELE Christoph Hellwig
2009-02-09 2:42 ` Dave Chinner
2009-01-26 7:31 ` [PATCH 16/17] xfs: use mutex_is_locked in XFS_DQ_IS_LOCKED Christoph Hellwig
2009-02-09 2:42 ` Dave Chinner
2009-01-26 7:31 ` [PATCH 17/17] xfs: sanitize qh_lock wrappers Christoph Hellwig
2009-02-09 2:45 ` Dave Chinner
2009-02-04 19:37 ` [PATCH 00/17] 2.6.30 queue Christoph Hellwig
2009-02-08 21:12 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090209024115.GH8830@disturbed \
--to=david@fromorbit.com \
--cc=hch@infradead.org \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox