misc cleanups and fixes
Subsystems (6)
PATCH 7/27 misc cleanups and fixes
- Comment and documentation fixlets
- Remove some unneeded fields from swapper_inode (these are a leftover from when I had swap using the filesystem IO functions).
- fix a printk bug in pci/pool.c: when dma_addr_t is 64 bit it generates a compile warning, and will print out garbage. Cast it to unsigned long long.
- Convert some writeback #defines into enums (Steven Augart)
Documentation/filesystems/porting | 4 +++- drivers/pci/pool.c | 8 ++++---- fs/block_dev.c | 2 -- fs/fs-writeback.c | 5 +++-- include/linux/writeback.h | 16 ++++++++++------ mm/page_io.c | 2 +- mm/swap_state.c | 7 ------- 7 files changed, 21 insertions(+), 23 deletions(-)
mm/page_io.c renamed from mm/page_io.c~misc +1 -1
@@ -130,7 +130,7 @@ out:* swapper_space doesn't have a real inode, so it gets a special vm_writeback() * so we don't need swap special cases in generic_vm_writeback(). * -* Swap pages are PageLocked and PageWriteback while under writeout so that +* Swap pages are !PageLocked and PageWriteback while under writeout so that * memory allocators will throttle against them. */ static int swap_vm_writeback (struct page *page,int *nr_to_write)
mm/swap_state.c renamed from mm/swap_state.c~misc +0 -7
@@ -21,16 +21,9 @@/* * swapper_inode doesn't do anything much. It is really only here to * avoid some special-casing in other parts of the kernel. -* -* We set i_size to "infinity" to keep the page I/O functions happy. The swap -* block allocator makes sure that allocations are in-range. A strange -* number is chosen to prevent various arith overflows elsewhere. For example, -* `lblock' in block_read_full_page(). */ static struct inode swapper_inode = { i_mapping: &swapper_space, - i_size:PAGE_SIZE *0xffffffffLL , - i_blkbits:PAGE_SHIFT , };extern struct address_space_operations swap_aops;
Documentation/filesystems/porting renamed from Documentation/filesystems/porting~misc +3 -1
@@ -3,11 +3,13 @@ Changes since 2.5.0: --- [recommended] -New helpers: sb_bread(), sb_getblk(), sb_get_hash_table(), set_bh(), +New helpers: sb_bread(), sb_getblk(), sb_find_get_block(), set_bh(), sb_set_blocksize() and sb_min_blocksize(). Use them. +(sb_find_get_block() replaces 2.4's get_hash_table()) + --- [recommended]
fs/block_dev.c renamed from fs/block_dev.c~misc +0 -2
@@ -23,8 +23,6 @@#include <asm/uaccess.h> -#define MAX_BUF_PER_PAGE (PAGE_CACHE_SIZE / 512) -static unsigned long max_block (struct block_device *bdev) {unsigned int retval = ~0U ;
drivers/pci/pool.c renamed from drivers/pci/pool.c~misc +4 -4
@@ -303,15 +303,15 @@ pci_pool_free (struct pci_pool *pool, vo#ifdef CONFIG_DEBUG_SLAB if (((dma - page->dma) + (void *)page->vaddr) != vaddr) { -printk (KERN_ERR "pci_pool_free %s/%s, %p (bad vaddr)/%lx\n" , +printk (KERN_ERR "pci_pool_free %s/%s, %p (bad vaddr)/%Lx\n" , pool->dev ? pool->dev->slot_name :NULL , - pool->name, vaddr, (unsigned long ) dma); + pool->name, vaddr, (unsigned long long ) dma);return ; }if (page->bitmap [map] & (1UL << block)) { -printk (KERN_ERR "pci_pool_free %s/%s, dma %x already free\n" , +printk (KERN_ERR "pci_pool_free %s/%s, dma %Lx already free\n" , pool->dev ? pool->dev->slot_name :NULL , - pool->name, dma); + pool->name, (unsigned long long )dma);return ; }memset (vaddr,POOL_POISON_BYTE , pool->size);
include/linux/writeback.h renamed from include/linux/writeback.h~misc +10 -6
@@ -24,18 +24,22 @@ static inline int current_is_pdflush(voi/* * fs/fs-writeback.c */ -#define WB_SYNC_NONE 0/* Don't wait on anything */ -#define WB_SYNC_LAST 1/* Wait on the last-written mapping */ -#define WB_SYNC_ALL 2/* Wait on every mapping */ -#define WB_SYNC_HOLD 3/* Hold the inode on sb_dirty for sys_sync() */ +enum writeback_sync_modes { +WB_SYNC_NONE =0 ,/* Don't wait on anything */ +WB_SYNC_LAST =1 ,/* Wait on the last-written mapping */ +WB_SYNC_ALL =2 ,/* Wait on every mapping */ +WB_SYNC_HOLD =3 ,/* Hold the inode on sb_dirty for sys_sync() */ +}; -void writeback_unlocked_inodes (int *nr_to_write,int sync_mode, -unsigned long *older_than_this); +void writeback_unlocked_inodes (int *nr_to_write, +enum writeback_sync_modes sync_mode, +unsigned long *older_than_this);void wake_up_inode (struct inode *inode);void __wait_on_inode (struct inode * inode);void sync_inodes_sb (struct super_block *,int wait);void sync_inodes (int wait); +/* writeback.h requires fs.h; it, too, is not included from here. */ static inline void wait_on_inode (struct inode *inode) {if (inode->i_state &I_LOCK )
fs/fs-writeback.c renamed from fs/fs-writeback.c~misc +3 -2
@@ -287,8 +287,9 @@ out:* * This is a "memory cleansing" operation, not a "data integrity" operation. */ -void writeback_unlocked_inodes (int *nr_to_write,int sync_mode, -unsigned long *older_than_this) +void writeback_unlocked_inodes (int *nr_to_write, +enum writeback_sync_modes sync_mode, +unsigned long *older_than_this) {struct super_block *sb;
-