]> git.karo-electronics.de Git - karo-tx-linux.git/commit
fsnotify: take groups mark_lock before mark lock
authorLino Sanfilippo <LinoSanfilippo@gmx.de>
Tue, 14 Jun 2011 15:29:48 +0000 (17:29 +0200)
committerEric Paris <eparis@redhat.com>
Mon, 26 Mar 2012 15:21:14 +0000 (11:21 -0400)
commitf1ae5e850a85e0db65d95c13ed6cc31d2450c5f2
tree0d46a1f89c9b0f7ca644bae1e4010cf2eb30703c
parent0f948ec4aff7eb629b08e7dd3d9761be17a1ae9e
fsnotify: take groups mark_lock before mark lock

Race-free addition and removal of a mark to a groups mark list would be easier
if we could lock the mark list of group before we lock the specific mark.
This patch changes the order used to add/remove marks to/from mark lists from

1. mark->lock
2. group->mark_lock
3. inode->i_lock

to

1. group->mark_lock
2. mark->lock
3. inode->i_lock

Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: Eric Paris <eparis@redhat.com>
fs/notify/mark.c