Commit 5d2bf8a55e03b0e59ed5a4ac2ff7f9ee3ba7e40d

Authored by Christoph Hellwig
Committed by Alex Elder
1 parent 785ce41805

xfs: fix a few compiler warnings with CONFIG_XFS_QUOTA=n

Andi Kleen reported that gcc-4.5 gives lots of warnings for him
inside the XFS code.  It turned out most of them are due to the
quota stubs beeing macros, and gcc now complaining about macros
evaluating to 0 that are not assigned to variables.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>

Showing 1 changed file with 16 additions and 4 deletions Side-by-side Diff

... ... @@ -346,8 +346,17 @@
346 346 #define xfs_trans_mod_dquot_byino(tp, ip, fields, delta)
347 347 #define xfs_trans_apply_dquot_deltas(tp)
348 348 #define xfs_trans_unreserve_and_mod_dquots(tp)
349   -#define xfs_trans_reserve_quota_nblks(tp, ip, nblks, ninos, flags) (0)
350   -#define xfs_trans_reserve_quota_bydquots(tp, mp, u, g, nb, ni, fl) (0)
  349 +static inline int xfs_trans_reserve_quota_nblks(struct xfs_trans *tp,
  350 + struct xfs_inode *ip, long nblks, long ninos, uint flags)
  351 +{
  352 + return 0;
  353 +}
  354 +static inline int xfs_trans_reserve_quota_bydquots(struct xfs_trans *tp,
  355 + struct xfs_mount *mp, struct xfs_dquot *udqp,
  356 + struct xfs_dquot *gdqp, long nblks, long nions, uint flags)
  357 +{
  358 + return 0;
  359 +}
351 360 #define xfs_qm_vop_create_dqattach(tp, ip, u, g)
352 361 #define xfs_qm_vop_rename_dqattach(it) (0)
353 362 #define xfs_qm_vop_chown(tp, ip, old, new) (NULL)
354 363  
... ... @@ -357,11 +366,14 @@
357 366 #define xfs_qm_dqdetach(ip)
358 367 #define xfs_qm_dqrele(d)
359 368 #define xfs_qm_statvfs(ip, s)
360   -#define xfs_qm_sync(mp, fl) (0)
  369 +static inline int xfs_qm_sync(struct xfs_mount *mp, int flags)
  370 +{
  371 + return 0;
  372 +}
361 373 #define xfs_qm_newmount(mp, a, b) (0)
362 374 #define xfs_qm_mount_quotas(mp)
363 375 #define xfs_qm_unmount(mp)
364   -#define xfs_qm_unmount_quotas(mp) (0)
  376 +#define xfs_qm_unmount_quotas(mp)
365 377 #endif /* CONFIG_XFS_QUOTA */
366 378  
367 379 #define xfs_trans_unreserve_quota_nblks(tp, ip, nblks, ninos, flags) \