summaryrefslogtreecommitdiff
path: root/include/linux/writeback.h
diff options
context:
space:
mode:
authorAndrew Morton <akpm@zip.com.au>2002-07-04 08:30:30 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2002-07-04 08:30:30 -0700
commit06be3a5e71ad8d5e55d8efc480c76142f0d982e2 (patch)
tree460f015bbfde7591bcb253b7825e27b207efe41c /include/linux/writeback.h
parent5226cca6c08884dd98caad07967fc79a5c7cad9e (diff)
[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)
Diffstat (limited to 'include/linux/writeback.h')
-rw-r--r--include/linux/writeback.h18
1 files changed, 11 insertions, 7 deletions
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)