Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 47837
b: refs/heads/master
c: 7989cb8
h: refs/heads/master
i:
  47835: 4cb6030
v: v3
  • Loading branch information
David Chinner authored and Tim Shimmin committed Feb 10, 2007
1 parent ce90ecf commit 08e3fb8
Show file tree
Hide file tree
Showing 24 changed files with 88 additions and 64 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5e6a07dfe404cd4d8494d842b54706cb007fa04b
refs/heads/master: 7989cb8ef5dbc1411d3be48218c7b25ef6e71699
2 changes: 1 addition & 1 deletion trunk/fs/xfs/linux-2.6/xfs_aops.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ xfs_map_blocks(
return -error;
}

STATIC inline int
STATIC_INLINE int
xfs_iomap_valid(
xfs_iomap_t *iomapp,
loff_t offset)
Expand Down
24 changes: 12 additions & 12 deletions trunk/fs/xfs/linux-2.6/xfs_buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@
#include <linux/backing-dev.h>
#include <linux/freezer.h>

STATIC kmem_zone_t *xfs_buf_zone;
STATIC kmem_shaker_t xfs_buf_shake;
static kmem_zone_t *xfs_buf_zone;
static kmem_shaker_t xfs_buf_shake;
STATIC int xfsbufd(void *);
STATIC int xfsbufd_wakeup(int, gfp_t);
STATIC void xfs_buf_delwri_queue(xfs_buf_t *, int);

STATIC struct workqueue_struct *xfslogd_workqueue;
static struct workqueue_struct *xfslogd_workqueue;
struct workqueue_struct *xfsdatad_workqueue;

#ifdef XFS_BUF_TRACE
Expand Down Expand Up @@ -139,7 +139,7 @@ page_region_mask(
return mask;
}

STATIC inline void
STATIC_INLINE void
set_page_region(
struct page *page,
size_t offset,
Expand All @@ -151,7 +151,7 @@ set_page_region(
SetPageUptodate(page);
}

STATIC inline int
STATIC_INLINE int
test_page_region(
struct page *page,
size_t offset,
Expand All @@ -171,9 +171,9 @@ typedef struct a_list {
struct a_list *next;
} a_list_t;

STATIC a_list_t *as_free_head;
STATIC int as_list_len;
STATIC DEFINE_SPINLOCK(as_lock);
static a_list_t *as_free_head;
static int as_list_len;
static DEFINE_SPINLOCK(as_lock);

/*
* Try to batch vunmaps because they are costly.
Expand Down Expand Up @@ -1085,7 +1085,7 @@ xfs_buf_iostart(
return status;
}

STATIC __inline__ int
STATIC_INLINE int
_xfs_buf_iolocked(
xfs_buf_t *bp)
{
Expand All @@ -1095,7 +1095,7 @@ _xfs_buf_iolocked(
return 0;
}

STATIC __inline__ void
STATIC_INLINE void
_xfs_buf_ioend(
xfs_buf_t *bp,
int schedule)
Expand Down Expand Up @@ -1426,8 +1426,8 @@ xfs_free_bufhash(
/*
* buftarg list for delwrite queue processing
*/
STATIC LIST_HEAD(xfs_buftarg_list);
STATIC DEFINE_SPINLOCK(xfs_buftarg_lock);
LIST_HEAD(xfs_buftarg_list);
static DEFINE_SPINLOCK(xfs_buftarg_lock);

STATIC void
xfs_register_buftarg(
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/xfs/linux-2.6/xfs_export.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "xfs_mount.h"
#include "xfs_export.h"

STATIC struct dentry dotdot = { .d_name.name = "..", .d_name.len = 2, };
static struct dentry dotdot = { .d_name.name = "..", .d_name.len = 2, };

/*
* XFS encodes and decodes the fileid portion of NFS filehandles
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/xfs/linux-2.6/xfs_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static struct vm_operations_struct xfs_file_vm_ops;
static struct vm_operations_struct xfs_dmapi_file_vm_ops;
#endif

STATIC inline ssize_t
STATIC_INLINE ssize_t
__xfs_file_read(
struct kiocb *iocb,
const struct iovec *iov,
Expand Down Expand Up @@ -84,7 +84,7 @@ xfs_file_aio_read_invis(
return __xfs_file_read(iocb, iov, nr_segs, IO_ISAIO|IO_INVIS, pos);
}

STATIC inline ssize_t
STATIC_INLINE ssize_t
__xfs_file_write(
struct kiocb *iocb,
const struct iovec *iov,
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/xfs/linux-2.6/xfs_iops.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,13 @@ xfs_init_security(
*
* XXX(hch): nfsd is broken, better fix it instead.
*/
STATIC inline int
STATIC_INLINE int
xfs_has_fs_struct(struct task_struct *task)
{
return (task->fs != init_task.fs);
}

STATIC inline void
STATIC void
xfs_cleanup_inode(
bhv_vnode_t *dvp,
bhv_vnode_t *vp,
Expand Down
16 changes: 8 additions & 8 deletions trunk/fs/xfs/linux-2.6/xfs_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@
#include <linux/kthread.h>
#include <linux/freezer.h>

STATIC struct quotactl_ops xfs_quotactl_operations;
STATIC struct super_operations xfs_super_operations;
STATIC kmem_zone_t *xfs_vnode_zone;
STATIC kmem_zone_t *xfs_ioend_zone;
static struct quotactl_ops xfs_quotactl_operations;
static struct super_operations xfs_super_operations;
static kmem_zone_t *xfs_vnode_zone;
static kmem_zone_t *xfs_ioend_zone;
mempool_t *xfs_ioend_pool;

STATIC struct xfs_mount_args *
Expand Down Expand Up @@ -121,7 +121,7 @@ xfs_max_file_offset(
return (((__uint64_t)pagefactor) << bitshift) - 1;
}

STATIC __inline__ void
STATIC_INLINE void
xfs_set_inodeops(
struct inode *inode)
{
Expand All @@ -147,7 +147,7 @@ xfs_set_inodeops(
}
}

STATIC __inline__ void
STATIC_INLINE void
xfs_revalidate_inode(
xfs_mount_t *mp,
bhv_vnode_t *vp,
Expand Down Expand Up @@ -873,7 +873,7 @@ xfs_fs_get_sb(
mnt);
}

STATIC struct super_operations xfs_super_operations = {
static struct super_operations xfs_super_operations = {
.alloc_inode = xfs_fs_alloc_inode,
.destroy_inode = xfs_fs_destroy_inode,
.write_inode = xfs_fs_write_inode,
Expand All @@ -887,7 +887,7 @@ STATIC struct super_operations xfs_super_operations = {
.show_options = xfs_fs_show_options,
};

STATIC struct quotactl_ops xfs_quotactl_operations = {
static struct quotactl_ops xfs_quotactl_operations = {
.quota_sync = xfs_fs_quotasync,
.get_xstate = xfs_fs_getxstate,
.set_xstate = xfs_fs_setxstate,
Expand Down
6 changes: 3 additions & 3 deletions trunk/fs/xfs/linux-2.6/xfs_sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ xfs_stats_clear_proc_handler(
}
#endif /* CONFIG_PROC_FS */

STATIC ctl_table xfs_table[] = {
static ctl_table xfs_table[] = {
{XFS_RESTRICT_CHOWN, "restrict_chown", &xfs_params.restrict_chown.val,
sizeof(int), 0644, NULL, &proc_dointvec_minmax,
&sysctl_intvec, NULL,
Expand Down Expand Up @@ -136,12 +136,12 @@ STATIC ctl_table xfs_table[] = {
{0}
};

STATIC ctl_table xfs_dir_table[] = {
static ctl_table xfs_dir_table[] = {
{FS_XFS, "xfs", NULL, 0, 0555, xfs_table},
{0}
};

STATIC ctl_table xfs_root_table[] = {
static ctl_table xfs_root_table[] = {
{CTL_FS, "fs", NULL, 0, 0555, xfs_dir_table},
{0}
};
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/xfs/linux-2.6/xfs_vnode.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ DEFINE_SPINLOCK(vnumber_lock);
*/
#define NVSYNC 37
#define vptosync(v) (&vsync[((unsigned long)v) % NVSYNC])
STATIC wait_queue_head_t vsync[NVSYNC];
static wait_queue_head_t vsync[NVSYNC];

void
vn_init(void)
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/xfs/linux-2.6/xfs_vnode.h
Original file line number Diff line number Diff line change
Expand Up @@ -489,14 +489,14 @@ static inline struct bhv_vnode *vn_grab(struct bhv_vnode *vp)
#define VN_LOCK(vp) mutex_spinlock(&(vp)->v_lock)
#define VN_UNLOCK(vp, s) mutex_spinunlock(&(vp)->v_lock, s)

static __inline__ void vn_flagset(struct bhv_vnode *vp, uint flag)
STATIC_INLINE void vn_flagset(struct bhv_vnode *vp, uint flag)
{
spin_lock(&vp->v_lock);
vp->v_flag |= flag;
spin_unlock(&vp->v_lock);
}

static __inline__ uint vn_flagclr(struct bhv_vnode *vp, uint flag)
STATIC_INLINE uint vn_flagclr(struct bhv_vnode *vp, uint flag)
{
uint cleared;

Expand Down
6 changes: 3 additions & 3 deletions trunk/fs/xfs/quota/xfs_dquot_item.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ xfs_qm_dquot_logitem_committing(
/*
* This is the ops vector for dquots
*/
STATIC struct xfs_item_ops xfs_dquot_item_ops = {
static struct xfs_item_ops xfs_dquot_item_ops = {
.iop_size = (uint(*)(xfs_log_item_t*))xfs_qm_dquot_logitem_size,
.iop_format = (void(*)(xfs_log_item_t*, xfs_log_iovec_t*))
xfs_qm_dquot_logitem_format,
Expand Down Expand Up @@ -606,7 +606,7 @@ xfs_qm_qoffend_logitem_committing(xfs_qoff_logitem_t *qip, xfs_lsn_t commit_lsn)
return;
}

STATIC struct xfs_item_ops xfs_qm_qoffend_logitem_ops = {
static struct xfs_item_ops xfs_qm_qoffend_logitem_ops = {
.iop_size = (uint(*)(xfs_log_item_t*))xfs_qm_qoff_logitem_size,
.iop_format = (void(*)(xfs_log_item_t*, xfs_log_iovec_t*))
xfs_qm_qoff_logitem_format,
Expand All @@ -628,7 +628,7 @@ STATIC struct xfs_item_ops xfs_qm_qoffend_logitem_ops = {
/*
* This is the ops vector shared by all quotaoff-start log items.
*/
STATIC struct xfs_item_ops xfs_qm_qoff_logitem_ops = {
static struct xfs_item_ops xfs_qm_qoff_logitem_ops = {
.iop_size = (uint(*)(xfs_log_item_t*))xfs_qm_qoff_logitem_size,
.iop_format = (void(*)(xfs_log_item_t*, xfs_log_iovec_t*))
xfs_qm_qoff_logitem_format,
Expand Down
6 changes: 3 additions & 3 deletions trunk/fs/xfs/quota/xfs_qm.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ uint ndquot;

kmem_zone_t *qm_dqzone;
kmem_zone_t *qm_dqtrxzone;
STATIC kmem_shaker_t xfs_qm_shaker;
static kmem_shaker_t xfs_qm_shaker;

STATIC cred_t xfs_zerocr;
STATIC xfs_inode_t xfs_zeroino;
static cred_t xfs_zerocr;
static xfs_inode_t xfs_zeroino;

STATIC void xfs_qm_list_init(xfs_dqlist_t *, char *, int);
STATIC void xfs_qm_list_destroy(xfs_dqlist_t *);
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/xfs/quota/xfs_qm_bhv.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ xfs_qm_dqrele_null(
}


STATIC struct xfs_qmops xfs_qmcore_xfs = {
static struct xfs_qmops xfs_qmcore_xfs = {
.xfs_qminit = xfs_qm_newmount,
.xfs_qmdone = xfs_qm_unmount_quotadestroy,
.xfs_qmmount = xfs_qm_endmount,
Expand Down
30 changes: 27 additions & 3 deletions trunk/fs/xfs/support/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,37 @@ extern void assfail(char *expr, char *f, int l);

#ifndef DEBUG
# define ASSERT(expr) ((void)0)
#else

#ifndef STATIC
# define STATIC static noinline
#endif

#ifndef STATIC_INLINE
# define STATIC_INLINE static inline
#endif

#else /* DEBUG */

# define ASSERT(expr) ASSERT_ALWAYS(expr)
extern unsigned long random(void);
#endif

#ifndef STATIC
# define STATIC static
# define STATIC noinline
#endif

/*
* We stop inlining of inline functions in debug mode.
* Unfortunately, this means static inline in header files
* get multiple definitions, so they need to remain static.
* This then gives tonnes of warnings about unused but defined
* functions, so we need to add the unused attribute to prevent
* these spurious warnings.
*/
#ifndef STATIC_INLINE
# define STATIC_INLINE static __attribute__ ((unused)) noinline
#endif

#endif /* DEBUG */


#endif /* __XFS_SUPPORT_DEBUG_H__ */
12 changes: 6 additions & 6 deletions trunk/fs/xfs/xfs_attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@
*/

#define ATTR_SYSCOUNT 2
STATIC struct attrnames posix_acl_access;
STATIC struct attrnames posix_acl_default;
STATIC struct attrnames *attr_system_names[ATTR_SYSCOUNT];
static struct attrnames posix_acl_access;
static struct attrnames posix_acl_default;
static struct attrnames *attr_system_names[ATTR_SYSCOUNT];

/*========================================================================
* Function prototypes for the kernel.
Expand Down Expand Up @@ -2477,7 +2477,7 @@ posix_acl_default_exists(
return xfs_acl_vhasacl_default(vp);
}

STATIC struct attrnames posix_acl_access = {
static struct attrnames posix_acl_access = {
.attr_name = "posix_acl_access",
.attr_namelen = sizeof("posix_acl_access") - 1,
.attr_get = posix_acl_access_get,
Expand All @@ -2486,7 +2486,7 @@ STATIC struct attrnames posix_acl_access = {
.attr_exists = posix_acl_access_exists,
};

STATIC struct attrnames posix_acl_default = {
static struct attrnames posix_acl_default = {
.attr_name = "posix_acl_default",
.attr_namelen = sizeof("posix_acl_default") - 1,
.attr_get = posix_acl_default_get,
Expand All @@ -2495,7 +2495,7 @@ STATIC struct attrnames posix_acl_default = {
.attr_exists = posix_acl_default_exists,
};

STATIC struct attrnames *attr_system_names[] =
static struct attrnames *attr_system_names[] =
{ &posix_acl_access, &posix_acl_default };


Expand Down
6 changes: 3 additions & 3 deletions trunk/fs/xfs/xfs_attr_leaf.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ STATIC int xfs_attr_leaf_entsize(xfs_attr_leafblock_t *leaf, int index);
* Namespace helper routines
*========================================================================*/

STATIC inline attrnames_t *
STATIC_INLINE attrnames_t *
xfs_attr_flags_namesp(int flags)
{
return ((flags & XFS_ATTR_SECURE) ? &attr_secure:
Expand All @@ -105,7 +105,7 @@ xfs_attr_flags_namesp(int flags)
* If namespace bits don't match return 0.
* If all match then return 1.
*/
STATIC inline int
STATIC_INLINE int
xfs_attr_namesp_match(int arg_flags, int ondisk_flags)
{
return XFS_ATTR_NSP_ONDISK(ondisk_flags) == XFS_ATTR_NSP_ARGS_TO_ONDISK(arg_flags);
Expand All @@ -116,7 +116,7 @@ xfs_attr_namesp_match(int arg_flags, int ondisk_flags)
* then return 0.
* If all match or are overridable then return 1.
*/
STATIC inline int
STATIC_INLINE int
xfs_attr_namesp_match_overrides(int arg_flags, int ondisk_flags)
{
if (((arg_flags & ATTR_SECURE) == 0) !=
Expand Down
Loading

0 comments on commit 08e3fb8

Please sign in to comment.