Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Cleanup - indentation, unneeded exports etc.

Cleanup indentation & remove unneeded includes and symbol
exports. Remove now unused filesystem freezer code. Generally
minimise the diff from vanilla.

Signed-off-by: Nigel <nigel@tuxonice.net>
  • Loading branch information...
commit d5219a7e21ec84d056c555f9d131c815f2e5a565 1 parent f4813f5
@NigelCunningham authored
View
2  arch/powerpc/platforms/83xx/suspend.c
@@ -263,7 +263,7 @@ static int mpc83xx_suspend_begin(suspend_state_t state)
static int agent_thread_fn(void *data)
{
- set_freezable();
+ set_freezable();
while (1) {
wait_event_interruptible(agent_wq, pci_pm_state >= 2);
View
2  arch/powerpc/platforms/ps3/device-init.c
@@ -841,7 +841,7 @@ static int ps3_probe_thread(void *data)
if (res)
goto fail_free_irq;
- set_freezable();
+ set_freezable();
/* Loop here processing the requested notification events. */
do {
View
1  arch/x86/kernel/reboot.c
@@ -747,7 +747,6 @@ void machine_restart(char *cmd)
{
machine_ops.restart(cmd);
}
-EXPORT_SYMBOL_GPL(machine_restart);
void machine_halt(void)
{
View
1  arch/x86/mm/pageattr.c
@@ -1349,6 +1349,7 @@ void kernel_map_pages(struct page *page, int numpages, int enable)
*/
__flush_tlb_all();
}
+
EXPORT_SYMBOL_GPL(kernel_map_pages);
#ifdef CONFIG_HIBERNATION
View
2  drivers/acpi/acpi_pad.c
@@ -153,7 +153,7 @@ static int power_saving_thread(void *data)
u64 last_jiffies = 0;
sched_setscheduler(current, SCHED_RR, &param);
- set_freezable();
+ set_freezable();
while (!kthread_should_stop()) {
int cpu;
View
2  drivers/block/xen-blkback/blkback.c
@@ -276,7 +276,7 @@ int xen_blkif_schedule(void *arg)
struct xen_vbd *vbd = &blkif->vbd;
xen_blkif_get(blkif);
- set_freezable();
+ set_freezable();
while (!kthread_should_stop()) {
if (try_to_freeze())
View
10 drivers/md/md.c
@@ -7084,13 +7084,13 @@ void md_do_sync(struct mddev *mddev)
*
*/
- set_freezable();
+ set_freezable();
do {
mddev->curr_resync = 2;
try_again:
- try_to_freeze();
+ try_to_freeze();
if (kthread_should_stop())
set_bit(MD_RECOVERY_INTR, &mddev->recovery);
@@ -7115,7 +7115,7 @@ void md_do_sync(struct mddev *mddev)
*/
continue;
- try_to_freeze();
+ try_to_freeze();
/* We need to wait 'interruptible' so as not to
* contribute to the load average, and not to
@@ -7237,7 +7237,7 @@ void md_do_sync(struct mddev *mddev)
|| kthread_should_stop());
}
- try_to_freeze();
+ try_to_freeze();
if (kthread_should_stop())
goto interrupted;
@@ -7282,7 +7282,7 @@ void md_do_sync(struct mddev *mddev)
last_mark = next;
}
- try_to_freeze();
+ try_to_freeze();
if (kthread_should_stop())
goto interrupted;
View
2  drivers/net/irda/stir4200.c
@@ -739,7 +739,7 @@ static int stir_transmit_thread(void *arg)
struct net_device *dev = stir->netdev;
struct sk_buff *skb;
- set_freezable();
+ set_freezable();
while (!kthread_should_stop()) {
#ifdef CONFIG_PM
View
2  drivers/uwb/uwbd.c
@@ -271,7 +271,7 @@ static int uwbd(void *param)
struct uwb_event *evt;
int should_stop = 0;
- set_freezable();
+ set_freezable();
while (1) {
wait_event_interruptible_timeout(
rc->uwbd.wq,
View
2  drivers/w1/w1.c
@@ -976,7 +976,7 @@ int w1_process(void *data)
* time can be calculated in jiffies once.
*/
const unsigned long jtime = msecs_to_jiffies(w1_timeout * 1000);
- set_freezable();
+ set_freezable();
while (!kthread_should_stop()) {
if (dev->search_count) {
View
87 fs/block_dev.c
@@ -338,93 +338,6 @@ int thaw_bdev(struct block_device *bdev, struct super_block *sb)
}
EXPORT_SYMBOL(thaw_bdev);
-#ifdef CONFIG_FS_FREEZER_DEBUG
-#define FS_PRINTK(fmt, args...) printk(fmt, ## args)
-#else
-#define FS_PRINTK(fmt, args...)
-#endif
-
-/* #define DEBUG_FS_FREEZING */
-
-/**
- * freeze_filesystems - lock all filesystems and force them into a consistent
- * state
- * @which: What combination of fuse & non-fuse to freeze.
- */
-void freeze_filesystems(int which)
-{
- struct super_block *sb;
-
- lockdep_off();
-
- /*
- * Freeze in reverse order so filesystems dependant upon others are
- * frozen in the right order (eg. loopback on ext3).
- */
- list_for_each_entry_reverse(sb, &super_blocks, s_list) {
- FS_PRINTK(KERN_INFO "Considering %s.%s: (root %p, bdev %x)",
- sb->s_type->name ? sb->s_type->name : "?",
- sb->s_subtype ? sb->s_subtype : "", sb->s_root,
- sb->s_bdev ? sb->s_bdev->bd_dev : 0);
-
- if (sb->s_type->fs_flags & FS_IS_FUSE &&
- sb->s_frozen == SB_UNFROZEN &&
- which & FS_FREEZER_FUSE) {
- sb->s_frozen = SB_FREEZE_TRANS;
- sb->s_flags |= MS_FROZEN;
- FS_PRINTK("Fuse filesystem done.\n");
- continue;
- }
-
- if (!sb->s_root || !sb->s_bdev ||
- (sb->s_frozen == SB_FREEZE_TRANS) ||
- (sb->s_flags & MS_RDONLY) ||
- (sb->s_flags & MS_FROZEN) ||
- !(which & FS_FREEZER_NORMAL)) {
- FS_PRINTK(KERN_INFO "Nope.\n");
- continue;
- }
-
- FS_PRINTK(KERN_INFO "Freezing %x... ", sb->s_bdev->bd_dev);
- freeze_bdev(sb->s_bdev);
- sb->s_flags |= MS_FROZEN;
- FS_PRINTK(KERN_INFO "Done.\n");
- }
-
- lockdep_on();
-}
-
-/**
- * thaw_filesystems - unlock all filesystems
- * @which: What combination of fuse & non-fuse to thaw.
- */
-void thaw_filesystems(int which)
-{
- struct super_block *sb;
-
- lockdep_off();
-
- list_for_each_entry(sb, &super_blocks, s_list) {
- if (!(sb->s_flags & MS_FROZEN))
- continue;
-
- if (sb->s_type->fs_flags & FS_IS_FUSE) {
- if (!(which & FS_FREEZER_FUSE))
- continue;
-
- sb->s_frozen = SB_UNFROZEN;
- } else {
- if (!(which & FS_FREEZER_NORMAL))
- continue;
-
- thaw_bdev(sb->s_bdev, sb);
- }
- sb->s_flags &= ~MS_FROZEN;
- }
-
- lockdep_on();
-}
-
static int blkdev_writepage(struct page *page, struct writeback_control *wbc)
{
return block_write_full_page(page, blkdev_get_block, wbc);
View
2  fs/btrfs/async-thread.c
@@ -300,7 +300,7 @@ static int worker_loop(void *arg)
INIT_LIST_HEAD(&head);
INIT_LIST_HEAD(&prio_head);
- set_freezable();
+ set_freezable();
do {
again:
View
4 fs/btrfs/disk-io.c
@@ -1531,7 +1531,7 @@ static int cleaner_kthread(void *arg)
{
struct btrfs_root *root = arg;
- set_freezable();
+ set_freezable();
do {
vfs_check_frozen(root->fs_info->sb, SB_FREEZE_WRITE);
@@ -1564,7 +1564,7 @@ static int transaction_kthread(void *arg)
unsigned long delay;
bool cannot_commit;
- set_freezable();
+ set_freezable();
do {
cannot_commit = false;
View
2  fs/ext4/super.c
@@ -2701,7 +2701,7 @@ static int ext4_lazyinit_thread(void *arg)
unsigned long next_wakeup, cur;
BUG_ON(NULL == eli);
- set_freezable();
+ set_freezable();
cont_thread:
while (true) {
View
2  fs/gfs2/log.c
@@ -856,7 +856,7 @@ int gfs2_logd(void *data)
DEFINE_WAIT(wait);
unsigned preflush;
- set_freezable();
+ set_freezable();
while (!kthread_should_stop()) {
View
2  fs/gfs2/quota.c
@@ -1397,7 +1397,7 @@ int gfs2_quotad(void *data)
DEFINE_WAIT(wait);
int empty;
- set_freezable();
+ set_freezable();
while (!kthread_should_stop()) {
View
2  fs/jfs/jfs_logmgr.c
@@ -2337,7 +2337,7 @@ int jfsIOWait(void *arg)
{
struct lbuf *bp;
- set_freezable();
+ set_freezable();
do {
spin_lock_irq(&log_redrive_lock);
View
4 fs/jfs/jfs_txnmgr.c
@@ -2752,7 +2752,7 @@ int jfs_lazycommit(void *arg)
unsigned long flags;
struct jfs_sb_info *sbi;
- set_freezable();
+ set_freezable();
do {
LAZY_LOCK(flags);
@@ -2938,7 +2938,7 @@ int jfs_sync(void *arg)
struct jfs_inode_info *jfs_ip;
tid_t tid;
- set_freezable();
+ set_freezable();
do {
/*
View
2  fs/nilfs2/segment.c
@@ -2435,7 +2435,7 @@ static int nilfs_segctor_thread(void *arg)
struct the_nilfs *nilfs = sci->sc_super->s_fs_info;
int timeout = 0;
- set_freezable();
+ set_freezable();
sci->sc_timer.data = (unsigned long)current;
sci->sc_timer.function = nilfs_construction_timeout;
View
2  fs/xfs/xfs_trans_ail.c
@@ -544,7 +544,7 @@ xfsaild(
struct xfs_ail *ailp = data;
long tout = 0; /* milliseconds */
- set_freezable();
+ set_freezable();
while (!kthread_should_stop()) {
if (tout && tout <= 20)
View
2  kernel/kthread.c
@@ -342,7 +342,7 @@ int kthread_worker_fn(void *worker_ptr)
WARN_ON(worker->task);
worker->task = current;
- set_freezable();
+ set_freezable();
repeat:
set_current_state(TASK_INTERRUPTIBLE); /* mb paired w/ kthread_stop */
View
1  kernel/power/tuxonice.h
@@ -16,7 +16,6 @@
#include <linux/bootmem.h>
#include <linux/suspend.h>
#include <linux/fs.h>
-#include <linux/kmod.h>
#include <linux/module.h>
#include <asm/setup.h>
#include "tuxonice_pageflags.h"
View
2  kernel/power/tuxonice_ui.c
@@ -178,7 +178,7 @@ void toi_early_boot_message(int message_detail, int default_answer,
post_ask:
if ((warning_reason) && (!continue_req))
- machine_restart(NULL);
+ kernel_restart(NULL);
restore_toi_state(orig_state);
if (continue_req)
View
1  kernel/power/tuxonice_userui.c
@@ -29,7 +29,6 @@
#include <linux/tty.h>
#include <linux/vt_kern.h>
#include <linux/reboot.h>
-#include <linux/kmod.h>
#include <linux/security.h>
#include <linux/syscalls.h>
#include <linux/vt.h>
View
1  kernel/power/user.c
@@ -13,7 +13,6 @@
#include <linux/syscalls.h>
#include <linux/reboot.h>
#include <linux/export.h>
-#include <linux/kmod.h>
#include <linux/string.h>
#include <linux/device.h>
#include <linux/miscdevice.h>
View
1  mm/bootmem.c
@@ -33,7 +33,6 @@ EXPORT_SYMBOL(contig_page_data);
unsigned long max_low_pfn;
unsigned long min_low_pfn;
unsigned long max_pfn;
-EXPORT_SYMBOL_GPL(max_pfn);
bootmem_data_t bootmem_node_data[MAX_NUMNODES] __initdata;
View
1  mm/swapfile.c
@@ -449,7 +449,6 @@ swp_entry_t get_swap_page(void)
spin_unlock(&swap_lock);
return (swp_entry_t) {0};
}
-EXPORT_SYMBOL_GPL(get_swap_page);
/* The only caller of this function is now susupend routine */
swp_entry_t get_swap_page_of_type(int type)
View
4 mm/vmscan.c
@@ -2024,8 +2024,8 @@ static inline bool should_continue_reclaim(struct mem_cgroup_zone *mz,
unsigned long pages_for_compaction;
unsigned long inactive_lru_pages;
- if (sc->hibernation_mode && nr_reclaimed && nr_scanned && sc->nr_to_reclaim >= sc->nr_reclaimed)
- return true;
+ if (sc->hibernation_mode && nr_reclaimed && nr_scanned && sc->nr_to_reclaim >= sc->nr_reclaimed)
+ return true;
/* If not in reclaim/compaction mode, stop */
if (!(sc->reclaim_mode & RECLAIM_MODE_COMPACTION))
Please sign in to comment.
Something went wrong with that request. Please try again.