public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs: fix warnings with CONFIG_XFS_QUOTA disabled
@ 2009-06-12 15:34 Christoph Hellwig
  2009-06-12 15:58 ` Felix Blyakher
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2009-06-12 15:34 UTC (permalink / raw)
  To: xfs

Fix warnings about unitialized dquot variables by making sure
xfs_qm_vop_dqalloc touches it even when quotas are disabled.


Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: xfs/fs/xfs/xfs_quota.h
===================================================================
--- xfs.orig/fs/xfs/xfs_quota.h	2009-06-12 17:22:24.925939716 +0200
+++ xfs/fs/xfs/xfs_quota.h	2009-06-12 17:27:47.253814811 +0200
@@ -335,6 +335,14 @@ extern void xfs_qm_unmount(struct xfs_mo
 extern void xfs_qm_unmount_quotas(struct xfs_mount *);
 
 #else
+static inline int
+xfs_qm_vop_dqalloc(struct xfs_inode *ip, uid_t uid, gid_t gid, prid_t prid,
+		uint flags, struct xfs_dquot **udqp, struct xfs_dquot **gdqp)
+{
+	*udqp = NULL;
+	*gdqp = NULL;
+	return 0;
+}
 #define xfs_trans_dup_dqinfo(tp, tp2)
 #define xfs_trans_free_dqinfo(tp)
 #define xfs_trans_mod_dquot_byino(tp, ip, fields, delta)
@@ -342,7 +350,6 @@ extern void xfs_qm_unmount_quotas(struct
 #define xfs_trans_unreserve_and_mod_dquots(tp)
 #define xfs_trans_reserve_quota_nblks(tp, ip, nblks, ninos, flags)	(0)
 #define xfs_trans_reserve_quota_bydquots(tp, mp, u, g, nb, ni, fl)	(0)
-#define xfs_qm_vop_dqalloc(ip, uid, gid, prid, fl, ou, og)		(0)
 #define xfs_qm_vop_create_dqattach(tp, ip, u, g)
 #define xfs_qm_vop_rename_dqattach(it)					(0)
 #define xfs_qm_vop_chown(tp, ip, old, new)				(NULL)

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] xfs: fix warnings with CONFIG_XFS_QUOTA disabled
  2009-06-12 15:34 [PATCH] xfs: fix warnings with CONFIG_XFS_QUOTA disabled Christoph Hellwig
@ 2009-06-12 15:58 ` Felix Blyakher
  0 siblings, 0 replies; 2+ messages in thread
From: Felix Blyakher @ 2009-06-12 15:58 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: xfs


On Jun 12, 2009, at 10:34 AM, Christoph Hellwig wrote:

> Fix warnings about unitialized dquot variables by making sure
> xfs_qm_vop_dqalloc touches it even when quotas are disabled.
>
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Reviewed-by: Felix Blyakher <felixb@sgi.com>

>
>
> Index: xfs/fs/xfs/xfs_quota.h
> ===================================================================
> --- xfs.orig/fs/xfs/xfs_quota.h	2009-06-12 17:22:24.925939716 +0200
> +++ xfs/fs/xfs/xfs_quota.h	2009-06-12 17:27:47.253814811 +0200
> @@ -335,6 +335,14 @@ extern void xfs_qm_unmount(struct xfs_mo
> extern void xfs_qm_unmount_quotas(struct xfs_mount *);
>
> #else
> +static inline int
> +xfs_qm_vop_dqalloc(struct xfs_inode *ip, uid_t uid, gid_t gid,  
> prid_t prid,
> +		uint flags, struct xfs_dquot **udqp, struct xfs_dquot **gdqp)
> +{
> +	*udqp = NULL;
> +	*gdqp = NULL;
> +	return 0;
> +}
> #define xfs_trans_dup_dqinfo(tp, tp2)
> #define xfs_trans_free_dqinfo(tp)
> #define xfs_trans_mod_dquot_byino(tp, ip, fields, delta)
> @@ -342,7 +350,6 @@ extern void xfs_qm_unmount_quotas(struct
> #define xfs_trans_unreserve_and_mod_dquots(tp)
> #define xfs_trans_reserve_quota_nblks(tp, ip, nblks, ninos, flags)	(0)
> #define xfs_trans_reserve_quota_bydquots(tp, mp, u, g, nb, ni, fl)	(0)
> -#define xfs_qm_vop_dqalloc(ip, uid, gid, prid, fl, ou, og)		(0)
> #define xfs_qm_vop_create_dqattach(tp, ip, u, g)
> #define xfs_qm_vop_rename_dqattach(it)					(0)
> #define xfs_qm_vop_chown(tp, ip, old, new)				(NULL)
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-06-12 15:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-12 15:34 [PATCH] xfs: fix warnings with CONFIG_XFS_QUOTA disabled Christoph Hellwig
2009-06-12 15:58 ` Felix Blyakher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox