Cope with -Wundef. This means including xfs_macros.h early in a few more

files and changing #if XXXKAN -> #ifdef XXXKAN.

# this is just compile tested, since I don't have xfs partitions.
This commit is contained in:
Warner Losh 2006-06-01 19:01:47 +00:00
parent 27b45ae819
commit 088c5ab556
13 changed files with 24 additions and 19 deletions

View File

@ -36,6 +36,7 @@
#include "xfs.h"
#include "xfs_macros.h"
#include "xfs_fs.h"
#include "xfs_inum.h"
#include "xfs_log.h"
@ -156,7 +157,7 @@ xfs_iozero(
size_t count, /* size of data to zero */
loff_t end_size) /* max file size to set */
{
#if XXXKAN
#ifdef XXXKAN
unsigned bytes;
struct page *page;
struct address_space *mapping;
@ -307,7 +308,7 @@ xfs_read(
if (!(ioflags & IO_ISLOCKED))
xfs_ilock(ip, XFS_IOLOCK_SHARED);
#if XXXKAN
#ifdef XXXKAN
if (DM_EVENT_ENABLED(BHV_TO_VNODE(bdp)->v_vfsp, ip, DM_EVENT_READ) &&
!(ioflags & IO_INVIS)) {
int error;
@ -581,7 +582,7 @@ xfs_write(
int ioflags,
cred_t *credp)
{
#if XXXKAN
#ifdef XXXKAN
xfs_inode_t *xip;
xfs_mount_t *mp;
ssize_t ret;

View File

@ -70,7 +70,7 @@ fs_tosspages(
xfs_off_t last,
int fiopt)
{
#if XXXKAN
#ifdef XXXKAN
vnode_t *vp = BHV_TO_VNODE(bdp);
struct inode *ip = LINVFS_GET_IP(vp);
@ -91,7 +91,7 @@ fs_flushinval_pages(
xfs_off_t last,
int fiopt)
{
#if XXXKAN
#ifdef XXXKAN
vnode_t *vp = BHV_TO_VNODE(bdp);
struct inode *ip = LINVFS_GET_IP(vp);
@ -117,7 +117,7 @@ fs_flush_pages(
uint64_t flags,
int fiopt)
{
#if XXXKAN
#ifdef XXXKAN
vnode_t *vp = BHV_TO_VNODE(bdp);
struct inode *ip = LINVFS_GET_IP(vp);

View File

@ -435,7 +435,7 @@ xfs_inode_lock_init(
mrlock_init(&ip->i_lock, MRLOCK_ALLOW_EQUAL_PRI|MRLOCK_BARRIER,
"xfsino", (long)vp->v_number);
mrlock_init(&ip->i_iolock, MRLOCK_BARRIER, "xfsio", vp->v_number);
#if XXXKAN
#ifdef XXXKAN
init_waitqueue_head(&ip->i_ipin_wait);
#endif
atomic_set(&ip->i_pincount, 0);
@ -653,7 +653,7 @@ xfs_iextract(
}
}
#if XXXKAN
#ifdef XXXKAN
/*
* Not sure if while i_reclaim crap is needed on
* FreeBSD, will revisit this later.

View File

@ -32,6 +32,7 @@
#include "xfs.h"
#include "xfs_macros.h"
#include "xfs_fs.h"
#include "xfs_inum.h"
#include "xfs_log.h"
@ -68,7 +69,7 @@
#include "xfs_fsops.h"
#if XXXKAN
#ifdef XXXKAN
/*
* ioctl commands that are used by Linux filesystems
*/

View File

@ -32,6 +32,7 @@
#include "xfs.h"
#include "xfs_macros.h"
#include "xfs_inum.h"
#include "xfs_log.h"
#include "xfs_clnt.h"

View File

@ -2560,7 +2560,7 @@ attr_user_capable(
struct xfs_vnode *vp,
cred_t *cred)
{
#if XXXKAN
#ifdef XXXKAN
struct inode *inode = LINVFS_GET_IP(vp);
if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
@ -2580,7 +2580,7 @@ attr_trusted_capable(
struct xfs_vnode *vp,
cred_t *cred)
{
#if XXXKAN
#ifdef XXXKAN
struct inode *inode = LINVFS_GET_IP(vp);
if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
@ -2613,7 +2613,7 @@ attr_system_set(
if (!namesp)
return -EOPNOTSUPP;
error = namesp->attr_set(vp, name, data, size, xflags);
#if XXXKAN
#ifdef XXXKAN
if (!error)
error = vn_revalidate(vp);
#endif

View File

@ -350,7 +350,7 @@ xfs_swapext(
break;
}
#if XXXKAN /* Not necessary, vnodes are vrefed already by fgetvp */
#ifdef XXXKAN /* Not necessary, vnodes are vrefed already by fgetvp */
/*
* Increment vnode ref counts since xfs_trans_commit &
* xfs_trans_cancel will both unlock the inodes and

View File

@ -36,6 +36,7 @@
*/
#include "xfs.h"
#include "xfs_macros.h"
#include "xfs_types.h"
#include "xfs_inum.h"
#include "xfs_dir.h"

View File

@ -2762,7 +2762,7 @@ xfs_iunpin(
ASSERT(atomic_read(&ip->i_pincount) > 0);
if (atomic_dec_and_test(&ip->i_pincount)) {
#if XXXKAN
#ifdef XXXKAN
/*
* Should I mark FreeBSD vnode as dirty here?
*/
@ -3645,7 +3645,7 @@ xfs_iaccess(
(S_ISREG(imode) || S_ISDIR(imode) || S_ISLNK(imode)))
return XFS_ERROR(EROFS);
#if XXXKAN
#ifdef XXXKAN
if (IS_IMMUTABLE(inode))
return XFS_ERROR(EACCES);
#endif
@ -3750,7 +3750,7 @@ xfs_ichgtime(xfs_inode_t *ip,
*/
SYNCHRONIZE();
ip->i_update_core = 1;
#if XXXKAN
#ifdef XXXKAN
if (!(inode->i_state & I_LOCK))
mark_inode_dirty_sync(inode);

View File

@ -32,6 +32,7 @@
#include "xfs.h"
#include "xfs_macros.h"
#include "xfs_fs.h"
#include "xfs_inum.h"
#include "xfs_log.h"

View File

@ -537,7 +537,7 @@ xfs_trans_apply_sb_deltas(
offsetof(xfs_sb_t, sb_frextents) +
sizeof(sbp->sb_frextents) - 1);
#if XXXKAN
#ifdef XXXKAN
XFS_MTOVFS(tp->t_mountp)->vfs_super->s_dirt = 1;
#endif
printf("XFS_MTOVFS(tp->t_mountp)->vfs_super->s_dirt = 1;");

View File

@ -834,7 +834,7 @@ xfs_statvfs(
statp->f_fsid.val[0] = dev2udev(mp->m_dev);
statp->f_fsid.val[1] = 0;
#if XXXKAN /* not defined for FreeBSD */
#ifdef XXXKAN /* not defined for FreeBSD */
statp->f_namelen = MAXNAMELEN - 1;
#endif
return 0;

View File

@ -3424,7 +3424,7 @@ xfs_symlink(
udqp = gdqp = NULL;
#if XXXKAN
#ifdef XXXKAN
if (vap->va_mask & XFS_AT_PROJID)
prid = (xfs_prid_t)vap->va_projid;
else