From 06be3a5e71ad8d5e55d8efc480c76142f0d982e2 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Thu, 4 Jul 2002 08:30:30 -0700 Subject: [PATCH] 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) --- include/linux/writeback.h | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'include/linux/writeback.h') diff --git a/include/linux/writeback.h b/include/linux/writeback.h index a06b0f116ebd..1b2034aa5617 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h @@ -24,18 +24,22 @@ static inline int current_is_pdflush(void) /* * 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() */ - -void writeback_unlocked_inodes(int *nr_to_write, int sync_mode, - unsigned long *older_than_this); +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, + 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) -- cgit v1.2.3