Commit 17b2b36e authored by Nathan Scott's avatar Nathan Scott

[XFS] Sort out some minor differences between trees.

parent 9004fd8a
......@@ -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
......
......@@ -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>
......
......@@ -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,
ret = XFS_SEND_DATA(mp, DM_EVENT_READ,
BHV_TO_VNODE(bdp), *offset, size,
FILP_DELAY_FLAG(file), &locktype);
if (error) {
if (ret) {
xfs_iunlock(ip, XFS_IOLOCK_SHARED);
return -error;
return -ret;
}
}
......
......@@ -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
......
......@@ -117,7 +117,6 @@ vfs_mntupdate(
return ((*bhvtovfsops(next)->vfs_mntupdate)(next, fl, args));
}
int
vfs_root(
struct bhv_desc *bdp,
......
......@@ -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,
......
......@@ -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);
......
......@@ -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,
......
......@@ -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__ */
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment