summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2004-03-04 13:53:18 +1100
committerNathan Scott <nathans@sgi.com>2004-03-04 13:53:18 +1100
commit17b2b36ec535af8605945247fb069ad8891663a9 (patch)
treec47c82677648f117d8b85601041269d02a6291ee
parent9004fd8adf2e68ec7ba373a2a1bbe6d744fa2322 (diff)
[XFS] Sort out some minor differences between trees.
-rw-r--r--fs/xfs/Makefile10
-rw-r--r--fs/xfs/linux/xfs_linux.h1
-rw-r--r--fs/xfs/linux/xfs_lrw.c10
-rw-r--r--fs/xfs/linux/xfs_super.h2
-rw-r--r--fs/xfs/linux/xfs_vfs.c1
-rw-r--r--fs/xfs/xfs_dmops.c2
-rw-r--r--fs/xfs/xfs_mount.h4
-rw-r--r--fs/xfs/xfs_qmops.c2
-rw-r--r--fs/xfs/xfs_quota.h3
-rw-r--r--fs/xfs/xfs_vfsops.c9
10 files changed, 20 insertions, 24 deletions
diff --git a/fs/xfs/Makefile b/fs/xfs/Makefile
index 4612472d5e64..64b586ee847b 100644
--- a/fs/xfs/Makefile
+++ b/fs/xfs/Makefile
@@ -54,10 +54,6 @@ endif
obj-$(CONFIG_XFS_FS) += xfs.o
-ifneq ($(CONFIG_XFS_DMAPI),y)
-xfs-y += xfs_dmops.o
-endif
-
xfs-$(CONFIG_XFS_QUOTA) += $(addprefix quota/, \
xfs_dquot.o \
xfs_dquot_item.o \
@@ -67,8 +63,6 @@ xfs-$(CONFIG_XFS_QUOTA) += $(addprefix quota/, \
xfs_qm.o)
ifeq ($(CONFIG_XFS_QUOTA),y)
xfs-$(CONFIG_PROC_FS) += quota/xfs_qm_stats.o
-else
-xfs-y += xfs_qmops.o
endif
xfs-$(CONFIG_XFS_RT) += xfs_rtalloc.o
@@ -124,7 +118,9 @@ xfs-y += xfs_alloc.o \
xfs_utils.o \
xfs_vfsops.o \
xfs_vnodeops.o \
- xfs_rw.o
+ xfs_rw.o \
+ xfs_dmops.o \
+ xfs_qmops.o
xfs-$(CONFIG_XFS_TRACE) += xfs_dir2_trace.o
diff --git a/fs/xfs/linux/xfs_linux.h b/fs/xfs/linux/xfs_linux.h
index b4f7c29835ef..e76b25c3b8a7 100644
--- a/fs/xfs/linux/xfs_linux.h
+++ b/fs/xfs/linux/xfs_linux.h
@@ -85,6 +85,7 @@
#include <linux/seq_file.h>
#include <linux/init.h>
#include <linux/proc_fs.h>
+#include <linux/version.h>
#include <asm/page.h>
#include <asm/div64.h>
diff --git a/fs/xfs/linux/xfs_lrw.c b/fs/xfs/linux/xfs_lrw.c
index ac01541dfc92..2077d8536208 100644
--- a/fs/xfs/linux/xfs_lrw.c
+++ b/fs/xfs/linux/xfs_lrw.c
@@ -333,14 +333,14 @@ xfs_read(
if (DM_EVENT_ENABLED(vp->v_vfsp, ip, DM_EVENT_READ) &&
!(ioflags & IO_INVIS)) {
- int error;
vrwlock_t locktype = VRWLOCK_READ;
- error = XFS_SEND_DATA(mp, DM_EVENT_READ, BHV_TO_VNODE(bdp), *offset, size,
- FILP_DELAY_FLAG(file), &locktype);
- if (error) {
+ ret = XFS_SEND_DATA(mp, DM_EVENT_READ,
+ BHV_TO_VNODE(bdp), *offset, size,
+ FILP_DELAY_FLAG(file), &locktype);
+ if (ret) {
xfs_iunlock(ip, XFS_IOLOCK_SHARED);
- return -error;
+ return -ret;
}
}
diff --git a/fs/xfs/linux/xfs_super.h b/fs/xfs/linux/xfs_super.h
index 5afd7c1bdbb3..f905528a2ea3 100644
--- a/fs/xfs/linux/xfs_super.h
+++ b/fs/xfs/linux/xfs_super.h
@@ -44,6 +44,8 @@
#ifdef CONFIG_XFS_QUOTA
# define vfs_insertquota(vfs) vfs_insertops(vfsp, &xfs_qmops)
+extern void xfs_qm_init(void);
+extern void xfs_qm_exit(void);
# define vfs_initquota() xfs_qm_init()
# define vfs_exitquota() xfs_qm_exit()
#else
diff --git a/fs/xfs/linux/xfs_vfs.c b/fs/xfs/linux/xfs_vfs.c
index 00de03bbac06..63adf1d5988e 100644
--- a/fs/xfs/linux/xfs_vfs.c
+++ b/fs/xfs/linux/xfs_vfs.c
@@ -117,7 +117,6 @@ vfs_mntupdate(
return ((*bhvtovfsops(next)->vfs_mntupdate)(next, fl, args));
}
-
int
vfs_root(
struct bhv_desc *bdp,
diff --git a/fs/xfs/xfs_dmops.c b/fs/xfs/xfs_dmops.c
index f7ff546a3ac1..cec54ba800eb 100644
--- a/fs/xfs/xfs_dmops.c
+++ b/fs/xfs/xfs_dmops.c
@@ -43,7 +43,7 @@
#include "xfs_dmapi.h"
#include "xfs_mount.h"
-xfs_dmops_t xfs_dmcore_xfs = {
+xfs_dmops_t xfs_dmcore_stub = {
.xfs_send_data = (xfs_send_data_t)fs_nosys,
.xfs_send_mmap = (xfs_send_mmap_t)fs_noerr,
.xfs_send_destroy = (xfs_send_destroy_t)fs_nosys,
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
index 50501d09ddf5..ea86fbaffd40 100644
--- a/fs/xfs/xfs_mount.h
+++ b/fs/xfs/xfs_mount.h
@@ -571,8 +571,8 @@ extern void xfs_check_frozen(xfs_mount_t *, bhv_desc_t *, int);
extern struct vfsops xfs_vfsops;
extern struct vnodeops xfs_vnodeops;
-extern struct xfs_dmops xfs_dmcore_xfs;
-extern struct xfs_qmops xfs_qmcore_xfs;
+extern struct xfs_dmops xfs_dmcore_stub;
+extern struct xfs_qmops xfs_qmcore_stub;
extern struct xfs_ioops xfs_iocore_xfs;
extern int xfs_init(void);
diff --git a/fs/xfs/xfs_qmops.c b/fs/xfs/xfs_qmops.c
index 1fea2e1d567f..4f40c92863d5 100644
--- a/fs/xfs/xfs_qmops.c
+++ b/fs/xfs/xfs_qmops.c
@@ -54,7 +54,7 @@ xfs_dqvopchown_default(
return NULL;
}
-xfs_qmops_t xfs_qmcore_xfs = {
+xfs_qmops_t xfs_qmcore_stub = {
.xfs_qminit = (xfs_qminit_t) fs_noerr,
.xfs_qmdone = (xfs_qmdone_t) fs_noerr,
.xfs_qmmount = (xfs_qmmount_t) fs_noerr,
diff --git a/fs/xfs/xfs_quota.h b/fs/xfs/xfs_quota.h
index d7041e5ac237..8cddc16397de 100644
--- a/fs/xfs/xfs_quota.h
+++ b/fs/xfs/xfs_quota.h
@@ -347,9 +347,6 @@ extern int xfs_qm_dqcheck(xfs_disk_dquot_t *, xfs_dqid_t, uint, uint, char *);
extern struct bhv_vfsops xfs_qmops;
-extern void xfs_qm_init(void);
-extern void xfs_qm_exit(void);
-
#endif /* __KERNEL__ */
#endif /* __XFS_QUOTA_H__ */
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c
index 2ecd9b3dc74d..d27b8765a936 100644
--- a/fs/xfs/xfs_vfsops.c
+++ b/fs/xfs/xfs_vfsops.c
@@ -451,9 +451,9 @@ xfs_mount(
* Setup xfs_mount function vectors from available behaviors
*/
p = vfs_bhv_lookup(vfsp, VFS_POSITION_DM);
- mp->m_dm_ops = p ? *(xfs_dmops_t *) vfs_bhv_custom(p) : xfs_dmcore_xfs;
+ mp->m_dm_ops = p ? *(xfs_dmops_t *) vfs_bhv_custom(p) : xfs_dmcore_stub;
p = vfs_bhv_lookup(vfsp, VFS_POSITION_QM);
- mp->m_qm_ops = p ? *(xfs_qmops_t *) vfs_bhv_custom(p) : xfs_qmcore_xfs;
+ mp->m_qm_ops = p ? *(xfs_qmops_t *) vfs_bhv_custom(p) : xfs_qmcore_stub;
p = vfs_bhv_lookup(vfsp, VFS_POSITION_IO);
mp->m_io_ops = p ? *(xfs_ioops_t *) vfs_bhv_custom(p) : xfs_iocore_xfs;
@@ -792,8 +792,9 @@ xfs_statvfs(
#if XFS_BIG_INUMS
if (!mp->m_inoadd)
#endif
- statp->f_files =
- min_t(sector_t, statp->f_files, mp->m_maxicount);
+ statp->f_files = min_t(typeof(statp->f_files),
+ statp->f_files,
+ mp->m_maxicount);
statp->f_ffree = statp->f_files - (sbp->sb_icount - sbp->sb_ifree);
XFS_SB_UNLOCK(mp, s);