diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2015-04-02 17:35:48 -0400 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2015-04-09 12:39:55 -0400 |
commit | 820f9f147dcce2602eefd9b575bbbd9ea14f0953 (patch) | |
tree | b609d199d2259add7d2d30efc9255b77b8e9e4e5 /fs/fs_pin.c | |
parent | 6a46c5735c29175da55b2fa9d53775182422cdd7 (diff) |
fs_pin: Allow for the possibility that m_list or s_list go unused.
This is needed to support lazily umounting locked mounts. Because the
entire unmounted subtree needs to stay together until there are no
users with references to any part of the subtree.
To support this guarantee that the fs_pin m_list and s_list nodes
are initialized by initializing them in init_fs_pin allowing
for the possibility that pin_insert_group does not touch them.
Further use hlist_del_init in pin_remove so that there is
a hlist_unhashed test before the list we attempt to update
the previous list item.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'fs/fs_pin.c')
-rw-r--r-- | fs/fs_pin.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/fs_pin.c b/fs/fs_pin.c index b06c98796afb..611b5408f6ec 100644 --- a/fs/fs_pin.c +++ b/fs/fs_pin.c | |||
@@ -9,8 +9,8 @@ static DEFINE_SPINLOCK(pin_lock); | |||
9 | void pin_remove(struct fs_pin *pin) | 9 | void pin_remove(struct fs_pin *pin) |
10 | { | 10 | { |
11 | spin_lock(&pin_lock); | 11 | spin_lock(&pin_lock); |
12 | hlist_del(&pin->m_list); | 12 | hlist_del_init(&pin->m_list); |
13 | hlist_del(&pin->s_list); | 13 | hlist_del_init(&pin->s_list); |
14 | spin_unlock(&pin_lock); | 14 | spin_unlock(&pin_lock); |
15 | spin_lock_irq(&pin->wait.lock); | 15 | spin_lock_irq(&pin->wait.lock); |
16 | pin->done = 1; | 16 | pin->done = 1; |