The patch titled
fs/reiser4/: more possible cleanups
has been added to the -mm tree. Its filename is
fs-reiser4-more-possible-cleanups.patch
See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this
------------------------------------------------------
Subject: fs/reiser4/: more possible cleanups
From: Adrian Bunk <[EMAIL PROTECTED]>
- make needlessly global functions static
- #if 0 unused functions
- #if REISER4_DEBUG functions that are only used with debugging enabled
Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>
Cc: Vladimir Saveliev <[EMAIL PROTECTED]>
Cc: Edward Shishkin <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---
fs/reiser4/coord.c | 8 ++---
fs/reiser4/debug.c | 6 ++++
fs/reiser4/debug.h | 4 --
fs/reiser4/plugin/cluster.h | 8 -----
fs/reiser4/plugin/item/ctail.c | 10 ++++++-
fs/reiser4/plugin/item/ctail.h | 1
fs/reiser4/plugin/item/internal.c | 4 ++
fs/reiser4/plugin/item/item.c | 4 ++
fs/reiser4/super.c | 4 ++
fs/reiser4/txnmgr.c | 40 +++++++++++++++-------------
fs/reiser4/txnmgr.h | 6 ----
11 files changed, 52 insertions(+), 43 deletions(-)
diff -puN fs/reiser4/coord.c~fs-reiser4-more-possible-cleanups
fs/reiser4/coord.c
--- a/fs/reiser4/coord.c~fs-reiser4-more-possible-cleanups
+++ a/fs/reiser4/coord.c
@@ -568,11 +568,6 @@ int coord_sideof_unit(coord_t * coord, s
}
#if REISER4_DEBUG
-#define DEBUG_COORD_FIELDS (sizeof(c1->plug_v) + sizeof(c1->body_v))
-#else
-#define DEBUG_COORD_FIELDS (0)
-#endif
-
int coords_equal(const coord_t * c1, const coord_t * c2)
{
assert("nikita-2840", c1 != NULL);
@@ -583,6 +578,7 @@ int coords_equal(const coord_t * c1, con
c1->item_pos == c2->item_pos &&
c1->unit_pos == c2->unit_pos && c1->between == c2->between;
}
+#endif /* REISER4_DEBUG */
/* If coord_is_after_rightmost return NCOORD_ON_THE_RIGHT, if
coord_is_after_leftmost
return NCOORD_ON_THE_LEFT, otherwise return NCOORD_INSIDE. */
@@ -683,6 +679,7 @@ int coord_is_between_items(const coord_t
return 0;
}
+#if REISER4_DEBUG
/* Returns true if the coordinates are positioned at adjacent units,
regardless of
before-after or item boundaries. */
int coord_are_neighbors(coord_t * c1, coord_t * c2)
@@ -721,6 +718,7 @@ int coord_are_neighbors(coord_t * c1, co
return 0;
}
}
+#endif /* REISER4_DEBUG */
/* Assuming two coordinates are positioned in the same node, return
COORD_CMP_ON_RIGHT,
COORD_CMP_ON_LEFT, or COORD_CMP_SAME depending on c1's position relative to
c2. */
diff -puN fs/reiser4/debug.c~fs-reiser4-more-possible-cleanups
fs/reiser4/debug.c
--- a/fs/reiser4/debug.c~fs-reiser4-more-possible-cleanups
+++ a/fs/reiser4/debug.c
@@ -40,11 +40,13 @@
#include <linux/sysctl.h>
#include <linux/hardirq.h>
+#if 0
#if REISER4_DEBUG
static void reiser4_report_err(void);
#else
#define reiser4_report_err() noop
#endif
+#endif /* 0 */
/*
* global buffer where message given to reiser4_panic is formatted.
@@ -95,6 +97,7 @@ void reiser4_do_panic(const char *format
panic("%s", panic_buf);
}
+#if 0
void
reiser4_print_prefix(const char *level, int reperr, const char *mid,
const char *function, const char *file, int lineno)
@@ -114,6 +117,7 @@ reiser4_print_prefix(const char *level,
if (reperr)
reiser4_report_err();
}
+#endif /* 0 */
/* Preemption point: this should be called periodically during long running
operations (carry, allocate, and squeeze are best examples) */
@@ -258,6 +262,7 @@ void reiser4_return_err(int code, const
}
}
+#if 0
/*
* report error information recorder by reiser4_return_err().
*/
@@ -272,6 +277,7 @@ static void reiser4_report_err(void)
}
}
}
+#endif /* 0 */
#endif /* REISER4_DEBUG */
diff -puN fs/reiser4/debug.h~fs-reiser4-more-possible-cleanups
fs/reiser4/debug.h
--- a/fs/reiser4/debug.h~fs-reiser4-more-possible-cleanups
+++ a/fs/reiser4/debug.h
@@ -223,10 +223,6 @@ extern int is_in_reiser4_context(void);
extern void reiser4_do_panic(const char *format, ...)
__attribute__ ((noreturn, format(printf, 1, 2)));
-extern void reiser4_print_prefix(const char *level, int reperr, const char
*mid,
- const char *function,
- const char *file, int lineno);
-
extern int reiser4_preempt_point(void);
extern void reiser4_print_stats(void);
diff -puN fs/reiser4/plugin/cluster.h~fs-reiser4-more-possible-cleanups
fs/reiser4/plugin/cluster.h
--- a/fs/reiser4/plugin/cluster.h~fs-reiser4-more-possible-cleanups
+++ a/fs/reiser4/plugin/cluster.h
@@ -226,14 +226,6 @@ static inline int dclust_get_extension_s
return hint->ext_coord.extension.ctail.shift;
}
-static inline void dclust_set_extension_shift(hint_t * hint)
-{
- assert("edward-1270",
- item_id_by_coord(&hint->ext_coord.coord) == CTAIL_ID);
- hint->ext_coord.extension.ctail.shift =
- cluster_shift_by_coord(&hint->ext_coord.coord);
-}
-
static inline int hint_is_unprepped_dclust(hint_t * hint)
{
assert("edward-1451", hint_is_valid(hint));
diff -puN fs/reiser4/plugin/item/ctail.c~fs-reiser4-more-possible-cleanups
fs/reiser4/plugin/item/ctail.c
--- a/fs/reiser4/plugin/item/ctail.c~fs-reiser4-more-possible-cleanups
+++ a/fs/reiser4/plugin/item/ctail.c
@@ -45,11 +45,19 @@ static ctail_item_format *ctail_formatte
return item_body_by_coord(coord);
}
-int cluster_shift_by_coord(const coord_t * coord)
+static int cluster_shift_by_coord(const coord_t * coord)
{
return get_unaligned(&ctail_formatted_at(coord)->cluster_shift);
}
+static inline void dclust_set_extension_shift(hint_t * hint)
+{
+ assert("edward-1270",
+ item_id_by_coord(&hint->ext_coord.coord) == CTAIL_ID);
+ hint->ext_coord.extension.ctail.shift =
+ cluster_shift_by_coord(&hint->ext_coord.coord);
+}
+
static loff_t off_by_coord(const coord_t * coord)
{
reiser4_key key;
diff -puN fs/reiser4/plugin/item/ctail.h~fs-reiser4-more-possible-cleanups
fs/reiser4/plugin/item/ctail.h
--- a/fs/reiser4/plugin/item/ctail.h~fs-reiser4-more-possible-cleanups
+++ a/fs/reiser4/plugin/item/ctail.h
@@ -78,7 +78,6 @@ int utmost_child_ctail(const coord_t *,
int scan_ctail(flush_scan *);
int convert_ctail(flush_pos_t *);
size_t inode_scaled_cluster_size(struct inode *);
-int cluster_shift_by_coord(const coord_t * coord);
#endif /* __FS_REISER4_CTAIL_H__ */
diff -puN fs/reiser4/plugin/item/internal.c~fs-reiser4-more-possible-cleanups
fs/reiser4/plugin/item/internal.c
--- a/fs/reiser4/plugin/item/internal.c~fs-reiser4-more-possible-cleanups
+++ a/fs/reiser4/plugin/item/internal.c
@@ -144,6 +144,8 @@ utmost_child_internal(const coord_t * co
return 0;
}
+#if REISER4_DEBUG
+
static void check_link(znode * left, znode * right)
{
znode *scan;
@@ -209,6 +211,8 @@ int check__internal(const coord_t * coor
return 0;
}
+#endif /* REISER4_DEBUG */
+
/* return true only if this item really points to "block" */
/* Audited by: green(2002.06.14) */
int has_pointer_to_internal(const coord_t * coord /* coord of item */ ,
diff -puN fs/reiser4/plugin/item/item.c~fs-reiser4-more-possible-cleanups
fs/reiser4/plugin/item/item.c
--- a/fs/reiser4/plugin/item/item.c~fs-reiser4-more-possible-cleanups
+++ a/fs/reiser4/plugin/item/item.c
@@ -271,6 +271,8 @@ int item_is_tail(const coord_t * item)
return item_id_by_coord(item) == FORMATTING_ID;
}
+#if REISER4_DEBUG
+
int item_is_statdata(const coord_t * item)
{
assert("vs-516", coord_is_existing_item(item));
@@ -283,6 +285,8 @@ int item_is_ctail(const coord_t * item)
return item_id_by_coord(item) == CTAIL_ID;
}
+#endif /* REISER4_DEBUG */
+
static int change_item(struct inode *inode,
reiser4_plugin * plugin,
pset_member memb)
diff -puN fs/reiser4/super.c~fs-reiser4-more-possible-cleanups
fs/reiser4/super.c
--- a/fs/reiser4/super.c~fs-reiser4-more-possible-cleanups
+++ a/fs/reiser4/super.c
@@ -47,6 +47,7 @@ __u64 reiser4_block_count(const struct s
return get_super_private(super)->block_count;
}
+#if REISER4_DEBUG
/*
* number of blocks in the current file system
*/
@@ -54,6 +55,7 @@ __u64 reiser4_current_block_count(void)
{
return get_current_super_private()->block_count;
}
+#endif /* REISER4_DEBUG */
/* set number of block in filesystem */
void reiser4_set_block_count(const struct super_block *super, __u64 nr)
@@ -293,6 +295,7 @@ reiser4_blocknr_is_sane_for(const struct
return *blk < sbinfo->block_count;
}
+#if REISER4_DEBUG
/*
* true, if block number @blk makes sense for the current file system
*/
@@ -300,6 +303,7 @@ int reiser4_blocknr_is_sane(const reiser
{
return reiser4_blocknr_is_sane_for(reiser4_get_current_sb(), blk);
}
+#endif /* REISER4_DEBUG */
/* Make Linus happy.
Local variables:
diff -puN fs/reiser4/txnmgr.c~fs-reiser4-more-possible-cleanups
fs/reiser4/txnmgr.c
--- a/fs/reiser4/txnmgr.c~fs-reiser4-more-possible-cleanups
+++ a/fs/reiser4/txnmgr.c
@@ -977,6 +977,28 @@ static int current_atom_complete_writes(
return current_atom_finish_all_fq();
}
+#if REISER4_DEBUG
+
+static void reiser4_info_atom(const char *prefix, const txn_atom * atom)
+{
+ if (atom == NULL) {
+ printk("%s: no atom\n", prefix);
+ return;
+ }
+
+ printk("%s: refcount: %i id: %i flags: %x txnh_count: %i"
+ " capture_count: %i stage: %x start: %lu, flushed: %i\n", prefix,
+ atomic_read(&atom->refcount), atom->atom_id, atom->flags,
+ atom->txnh_count, atom->capture_count, atom->stage,
+ atom->start_time, atom->flushed);
+}
+
+#else /* REISER4_DEBUG */
+
+static inline void reiser4_info_atom(const char *prefix, const txn_atom *
atom) {}
+
+#endif /* REISER4_DEBUG */
+
#define TOOMANYFLUSHES (1 << 13)
/* Called with the atom locked and no open "active" transaction handlers except
@@ -3094,24 +3116,6 @@ void insert_into_atom_ovrwr_list(txn_ato
ON_DEBUG(count_jnode(atom, node, NODE_LIST(node), OVRWR_LIST, 1));
}
-#if REISER4_DEBUG
-
-void reiser4_info_atom(const char *prefix, const txn_atom * atom)
-{
- if (atom == NULL) {
- printk("%s: no atom\n", prefix);
- return;
- }
-
- printk("%s: refcount: %i id: %i flags: %x txnh_count: %i"
- " capture_count: %i stage: %x start: %lu, flushed: %i\n", prefix,
- atomic_read(&atom->refcount), atom->atom_id, atom->flags,
- atom->txnh_count, atom->capture_count, atom->stage,
- atom->start_time, atom->flushed);
-}
-
-#endif
-
static int count_deleted_blocks_actor(txn_atom * atom,
const reiser4_block_nr * a,
const reiser4_block_nr * b, void *data)
diff -puN fs/reiser4/txnmgr.h~fs-reiser4-more-possible-cleanups
fs/reiser4/txnmgr.h
--- a/fs/reiser4/txnmgr.h~fs-reiser4-more-possible-cleanups
+++ a/fs/reiser4/txnmgr.h
@@ -695,12 +695,6 @@ void protected_jnodes_init(protected_jno
void protected_jnodes_done(protected_jnodes * list);
void reiser4_invalidate_list(struct list_head * head);
-#if REISER4_DEBUG
-void reiser4_info_atom(const char *prefix, const txn_atom * atom);
-#else
-#define reiser4_info_atom(p,a) noop
-#endif
-
# endif /* __REISER4_TXNMGR_H__ */
/* Make Linus happy.
_
Patches currently in -mm which might be from [EMAIL PROTECTED] are
origin.patch
make-drivers-acpi-baycdrive_bays-static.patch
make-drivers-acpi-eccec_ecdt-static.patch
drivers-acpi-oslc-fix-a-null-check.patch
git-alsa.patch
tidy-gregkh-driver-udev-compatible-hack.patch
git-dvb.patch
git-gfs2-nmw.patch
fs-dlm-lowcomms-tcpc-remove-2-functions.patch
git-mtd.patch
make-drivers-mtd-cmdlinepartcmtdpart_setup-static.patch
git-net.patch
net-possible-cleanups.patch
net-uninline-skb_put-fix.patch
git-ocfs2.patch
drivers-pci-hotplug-ibmphp_pcic-fix-null-dereference.patch
git-scsi-misc.patch
drivers-scsi-small-cleanups.patch
drivers-scsi-aic7xxx-aic79xx_corec-make-ahd_match_scb-static.patch
drivers-scsi-advansysc-cleanups.patch
megaraid-fix-warnings-when-config_proc_fs=n.patch
drivers-scsi-dpt_i2oc-remove-dead-code.patch
drivers-scsi-aic7xxx-make-functions-static.patch
make-qla2x00_reg_remote_port-static.patch
make-drivers-usb-host-u132-hcdcu132_hcd_wait-static.patch
make-drivers-usb-input-wacom_syscwacom_sys_irq-static.patch
drivers-usb-misc-ftdi-elanc-fixes-and-cleanups.patch
make-drivers-usb-core-drivercusb_device_match-static.patch
arch-i386-kernel-remove-remaining-pc98-code.patch
git-cryptodev.patch
make-mm-thrashcglobal_faults-static.patch
acx1xx-wireless-driver.patch
drivers-edac-make-code-static.patch
remove-drivers-pci-searchcpci_find_device_reverse.patch
ext4_ext_split-remove-dead-code.patch
the-scheduled-removal-of-some-oss-options.patch
make-arch-i386-pci-commoncpci_bf_sort-static.patch
make-mm-shmemcshmem_xattr_security_handler-static.patch
remove-kernel-lockdepclockdep_internal.patch
make-kernel-signalckill_proc_info-static.patch
make-ecryptfs_version_str_map-static.patch
make-fs-jbd-transactionc__journal_temp_unlink_buffer-static.patch
make-fs-jbd2-transactionc__jbd2_journal_temp_unlink_buffer-static.patch
fs-lockd-hostc-make-2-functions-static.patch
make-fs-proc-basecproc_pid_instantiate-static.patch
make-ext2_get_blocks-static.patch
generic-bug-implementation-include-linux-bugh-must-always-include-linux-moduleh.patch
drivers-mtd-nand-rtc_from4c-use-lib-bitrevc.patch
fsstack-introduce-fsstack_copy_attrinode_-fs-stackc-should-include-linux-fs_stackh.patch
i4l-remove-the-broken-hisax_amd7930-option.patch
readahead-events-accounting-make-readahead_debug_level-static.patch
reiser4-export-remove_from_page_cache-fix.patch
fs-reiser4-possible-cleanups.patch
reiser4-possible-cleanups-2.patch
fs-reiser4-possible-cleanups-2.patch
fs-reiser4-more-possible-cleanups.patch
make-drivers-md-dm-snapcksnapd-static.patch
gtod-persistent-clock-support-core-remove-kernel-timercwall_jiffies.patch
gtod-persistent-clock-support-i386-i386-unexport-read_persistent_clock.patch
dynticks-extend-next_timer_interrupt-to-use-a-reference-jiffie-make-kernel-timerc__next_timer_interrupt-static.patch
updated-i386-convert-to-clock-event-devices-arch-i386-kernel-apicc-make-a-function-static.patch
updated-i386-convert-to-clock-event-devices-remove-arch-i386-kernel-time_hpetchpet_reenable.patch
slim-main-patch-security-slim-slm_mainc-make-2-functions-static.patch
slab-cache-shrinker-statistics.patch
debug-shared-irqs-kconfig-fix.patch
i386-enable-4k-stacks-by-default.patch
mutex-subsystem-synchro-test-module.patch
-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html