lkml.org 
[lkml]   [2002]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH][2.5] introduce new list macros for hfs (5 occ)
This uses the list_move* and list_del_init macros for hfs

--- linus-2.5/fs/hfs/catalog.c Sun Jun 9 04:16:00 2002
+++ thunder-2.5/fs/hfs/catalog.c Sun Jun 9 06:32:40 2002
@@ -158,8 +158,7 @@

static inline void remove_hash(struct hfs_cat_entry *entry)
{
- list_del(&entry->hash);
- INIT_LIST_HEAD(&entry->hash);
+ list_del_init(&entry->hash);
}

/*
@@ -210,10 +209,8 @@
entry->state |= HFS_DIRTY;

/* Only add valid (ie hashed) entries to the dirty list. */
- if (!list_empty(&entry->hash)) {
- list_del(&entry->list);
- list_add(&entry->list, &mdb->entry_dirty);
- }
+ if (!list_empty(&entry->hash))
+ list_move(&entry->list, &mdb->entry_dirty);
}
spin_unlock(&entry_lock);
}
@@ -223,8 +220,7 @@
{
if (!(entry->state & HFS_DELETED)) {
entry->state |= HFS_DELETED;
- list_del(&entry->hash);
- INIT_LIST_HEAD(&entry->hash);
+ list_del_init(&entry->hash);

if (entry->type == HFS_CDR_FIL) {
/* free all extents */
@@ -882,8 +878,7 @@
}

if (!entry->count) {
- list_del(&entry->hash);
- INIT_LIST_HEAD(&entry->hash);
+ list_del_init(&entry->hash);
list_del(&entry->list);
list_add(&entry->list, dispose);
continue;
@@ -961,8 +956,7 @@
insert = entry_in_use.prev;

/* add to in_use list */
- list_del(&entry->list);
- list_add(&entry->list, insert);
+ list_move(&entry->list, insert);

/* reset DIRTY, set LOCK */
entry->state ^= HFS_DIRTY | HFS_LOCK;
--
Lightweight patch manager using pine. If you have any objections, tell me.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:26    [W:0.035 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site