]> git.hungrycats.org Git - linux/commitdiff
[XFS] Sort out some minor differences between trees.
authorNathan Scott <nathans@sgi.com>
Thu, 4 Mar 2004 02:53:18 +0000 (13:53 +1100)
committerNathan Scott <nathans@sgi.com>
Thu, 4 Mar 2004 02:53:18 +0000 (13:53 +1100)
fs/xfs/Makefile
fs/xfs/linux/xfs_linux.h
fs/xfs/linux/xfs_lrw.c
fs/xfs/linux/xfs_super.h
fs/xfs/linux/xfs_vfs.c
fs/xfs/xfs_dmops.c
fs/xfs/xfs_mount.h
fs/xfs/xfs_qmops.c
fs/xfs/xfs_quota.h
fs/xfs/xfs_vfsops.c

index 4612472d5e64ec8926b40222f0981ce131b305ef..64b586ee847b1ff005d92837e8d62f66297eccfd 100644 (file)
@@ -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
 
index b4f7c29835efcec9505b5a6617343a5ca1da50ed..e76b25c3b8a7b23193a15d7792a610500fdf7fe8 100644 (file)
@@ -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>
index ac01541dfc921697d6cdd0c59bc0c7ac62964b8c..2077d85362087dab77dc185dd9abcae49f959b58 100644 (file)
@@ -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;
                }
        }
 
index 5afd7c1bdbb364d719190b60353814691fbd5259..f905528a2ea3fdb6d30bb512b9010cb20ec68c41 100644 (file)
@@ -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
index 00de03bbac068de6b6e39ef3e1c7d44314f58346..63adf1d5988ebde45b32e8a264633ed5dd129aa6 100644 (file)
@@ -117,7 +117,6 @@ vfs_mntupdate(
        return ((*bhvtovfsops(next)->vfs_mntupdate)(next, fl, args));
 }
 
-
 int
 vfs_root(
        struct bhv_desc         *bdp,
index f7ff546a3ac18a805d1dbd1000954406233bc22e..cec54ba800eb641a050309e38a9b4c42c7c65330 100644 (file)
@@ -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,
index 50501d09ddf5f65d5ee37fa0a428b0e313bded8a..ea86fbaffd407a945dc8babb39af8ad9336abc51 100644 (file)
@@ -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);
index 1fea2e1d567f59ba0d086a6c389ac3beeac6379b..4f40c92863d51ffda17cf7d7832f0dec86a3b536 100644 (file)
@@ -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,
index d7041e5ac2372aa6a4ff1f908d50f7e0f465dd4f..8cddc16397de2c060104f4a43a8d7586c3d8848f 100644 (file)
@@ -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__ */
index 2ecd9b3dc74d3a7620ee5e8b6b35720b867b605a..d27b8765a936baad7a1c30dcb37e9e05eb8102e6 100644 (file)
@@ -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);