Skip to content

Commit

Permalink
xfs: clean up xfs_bit.h includes
Browse files Browse the repository at this point in the history
With the removal of xfs_rw.h and other changes over time, xfs_bit.h
is being included in many files that don't actually need it. Clean
up the includes as necessary.

Also move the only-used-once xfs_ialloc_find_free() static inline
function out of a header file that is widely included to reduce
the number of needless dependencies on xfs_bit.h.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
  • Loading branch information
Dave Chinner authored and Ben Myers committed May 14, 2012
1 parent 2af51f3 commit ad1e95c
Show file tree
Hide file tree
Showing 28 changed files with 7 additions and 35 deletions.
1 change: 0 additions & 1 deletion fs/xfs/xfs_alloc_btree.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_types.h"
#include "xfs_bit.h"
#include "xfs_log.h"
#include "xfs_trans.h"
#include "xfs_sb.h"
Expand Down
1 change: 0 additions & 1 deletion fs/xfs/xfs_aops.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "xfs.h"
#include "xfs_bit.h"
#include "xfs_log.h"
#include "xfs_sb.h"
#include "xfs_ag.h"
Expand Down
1 change: 0 additions & 1 deletion fs/xfs/xfs_dfrag.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_types.h"
#include "xfs_bit.h"
#include "xfs_log.h"
#include "xfs_trans.h"
#include "xfs_sb.h"
Expand Down
1 change: 0 additions & 1 deletion fs/xfs/xfs_dir2.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_types.h"
#include "xfs_bit.h"
#include "xfs_log.h"
#include "xfs_inum.h"
#include "xfs_trans.h"
Expand Down
1 change: 0 additions & 1 deletion fs/xfs/xfs_dquot_item.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/
#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_bit.h"
#include "xfs_log.h"
#include "xfs_trans.h"
#include "xfs_sb.h"
Expand Down
1 change: 0 additions & 1 deletion fs/xfs/xfs_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/
#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_bit.h"
#include "xfs_log.h"
#include "xfs_sb.h"
#include "xfs_ag.h"
Expand Down
1 change: 0 additions & 1 deletion fs/xfs/xfs_fsops.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_types.h"
#include "xfs_bit.h"
#include "xfs_log.h"
#include "xfs_trans.h"
#include "xfs_sb.h"
Expand Down
7 changes: 7 additions & 0 deletions fs/xfs/xfs_ialloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,13 @@ xfs_ialloc_get_rec(
/*
* Visible inode allocation functions.
*/
/*
* Find a free (set) bit in the inode bitmask.
*/
static inline int xfs_ialloc_find_free(xfs_inofree_t *fp)
{
return xfs_lowbit64(*fp);
}

/*
* Allocate an inode on disk.
Expand Down
9 changes: 0 additions & 9 deletions fs/xfs/xfs_ialloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,6 @@ xfs_make_iptr(struct xfs_mount *mp, struct xfs_buf *b, int o)
(xfs_buf_offset(b, o << (mp)->m_sb.sb_inodelog));
}

/*
* Find a free (set) bit in the inode bitmask.
*/
static inline int xfs_ialloc_find_free(xfs_inofree_t *fp)
{
return xfs_lowbit64(*fp);
}


/*
* Allocate an inode on disk.
* Mode is used to tell whether the new inode will need space, and whether
Expand Down
1 change: 0 additions & 1 deletion fs/xfs/xfs_iget.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "xfs_fs.h"
#include "xfs_types.h"
#include "xfs_acl.h"
#include "xfs_bit.h"
#include "xfs_log.h"
#include "xfs_inum.h"
#include "xfs_trans.h"
Expand Down
1 change: 0 additions & 1 deletion fs/xfs/xfs_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_types.h"
#include "xfs_bit.h"
#include "xfs_log.h"
#include "xfs_inum.h"
#include "xfs_trans.h"
Expand Down
1 change: 0 additions & 1 deletion fs/xfs/xfs_inode_item.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_types.h"
#include "xfs_bit.h"
#include "xfs_log.h"
#include "xfs_trans.h"
#include "xfs_sb.h"
Expand Down
1 change: 0 additions & 1 deletion fs/xfs/xfs_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/
#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_bit.h"
#include "xfs_log.h"
#include "xfs_trans.h"
#include "xfs_sb.h"
Expand Down
1 change: 0 additions & 1 deletion fs/xfs/xfs_ioctl32.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <asm/uaccess.h>
#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_bit.h"
#include "xfs_log.h"
#include "xfs_trans.h"
#include "xfs_sb.h"
Expand Down
1 change: 0 additions & 1 deletion fs/xfs/xfs_iomap.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/
#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_bit.h"
#include "xfs_log.h"
#include "xfs_trans.h"
#include "xfs_sb.h"
Expand Down
1 change: 0 additions & 1 deletion fs/xfs/xfs_iops.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_acl.h"
#include "xfs_bit.h"
#include "xfs_log.h"
#include "xfs_trans.h"
#include "xfs_sb.h"
Expand Down
1 change: 0 additions & 1 deletion fs/xfs/xfs_itable.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_types.h"
#include "xfs_bit.h"
#include "xfs_log.h"
#include "xfs_inum.h"
#include "xfs_trans.h"
Expand Down
1 change: 0 additions & 1 deletion fs/xfs/xfs_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_types.h"
#include "xfs_bit.h"
#include "xfs_log.h"
#include "xfs_trans.h"
#include "xfs_sb.h"
Expand Down
1 change: 0 additions & 1 deletion fs/xfs/xfs_log_cil.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_types.h"
#include "xfs_bit.h"
#include "xfs_log.h"
#include "xfs_trans.h"
#include "xfs_trans_priv.h"
Expand Down
1 change: 0 additions & 1 deletion fs/xfs/xfs_qm_bhv.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/
#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_bit.h"
#include "xfs_log.h"
#include "xfs_trans.h"
#include "xfs_sb.h"
Expand Down
1 change: 0 additions & 1 deletion fs/xfs/xfs_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/

#include "xfs.h"
#include "xfs_bit.h"
#include "xfs_log.h"
#include "xfs_inum.h"
#include "xfs_trans.h"
Expand Down
1 change: 0 additions & 1 deletion fs/xfs/xfs_sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_types.h"
#include "xfs_bit.h"
#include "xfs_log.h"
#include "xfs_inum.h"
#include "xfs_trans.h"
Expand Down
1 change: 0 additions & 1 deletion fs/xfs/xfs_trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_types.h"
#include "xfs_bit.h"
#include "xfs_log.h"
#include "xfs_trans.h"
#include "xfs_sb.h"
Expand Down
1 change: 0 additions & 1 deletion fs/xfs/xfs_trans.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_types.h"
#include "xfs_bit.h"
#include "xfs_log.h"
#include "xfs_trans.h"
#include "xfs_sb.h"
Expand Down
1 change: 0 additions & 1 deletion fs/xfs/xfs_trans_buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_types.h"
#include "xfs_bit.h"
#include "xfs_log.h"
#include "xfs_trans.h"
#include "xfs_sb.h"
Expand Down
1 change: 0 additions & 1 deletion fs/xfs/xfs_trans_dquot.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/
#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_bit.h"
#include "xfs_log.h"
#include "xfs_trans.h"
#include "xfs_sb.h"
Expand Down
1 change: 0 additions & 1 deletion fs/xfs/xfs_trans_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_types.h"
#include "xfs_bit.h"
#include "xfs_log.h"
#include "xfs_trans.h"
#include "xfs_sb.h"
Expand Down
1 change: 0 additions & 1 deletion fs/xfs/xfs_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_types.h"
#include "xfs_bit.h"
#include "xfs_log.h"
#include "xfs_trans.h"
#include "xfs_sb.h"
Expand Down

0 comments on commit ad1e95c

Please sign in to comment.