Re: [PATCH 2/2] configfs: Rework configfs_depend_item() locking and make lockdep happy

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Louis Rilling
Date: Wednesday, January 28, 2009 - 3:32 am

On 27/01/09 20:13 -0800, Joel Becker wrote:

Definitely agreed. I should have written this comment instead of letting you
notice this.


Yes this is the expected impact. It is OK because
1) under a same critical section of configfs_dirent_lock, depend_item()
checks that CONFIGFS_USET_DROPPING is not set and bumps s_dependent;
2) under a same critical section of configfs_dirent_lock, configfs_rmdir()
checks the s_dependent count and tries to set CONFIGFS_USET_DROPPING.


Yes, this patch may look like an improvement, independently from lockdep. I
think that locking is simpler this way, and this also removes the need for
configfs_depend_rollback(). Moreover this moves towards the management of
configfs_dirents protected by configfs_dirent_lock only. In the end, it's up to
you to judge if this is a good direction ;)

Thanks,

Louis

-- 
Dr Louis Rilling			Kerlabs
Skype: louis.rilling			Batiment Germanium
Phone: (+33|0) 6 80 89 08 23		80 avenue des Buttes de Coesmes
http://www.kerlabs.com/			35700 Rennes
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
configfs, dlm_controld & lockdep, Steven Whitehouse, (Thu Dec 11, 7:20 am)
Re: configfs, dlm_controld & lockdep, Louis Rilling, (Thu Dec 11, 7:44 am)
Re: configfs, dlm_controld & lockdep, Joel Becker, (Thu Dec 11, 10:34 am)
Re: configfs, dlm_controld & lockdep, Louis Rilling, (Fri Dec 12, 3:06 am)
Re: [PATCH] configfs: Silence lockdep on mkdir(), rmdir() ..., Steven Whitehouse, (Thu Dec 18, 4:26 am)
Make lockdep happy with configfs, Louis Rilling, (Thu Dec 18, 11:00 am)
Re: Make lockdep happy with configfs, Louis Rilling, (Mon Jan 26, 4:51 am)
Re: Make lockdep happy with configfs, Joel Becker, (Tue Jan 27, 8:44 pm)
Re: [PATCH 2/2] configfs: Rework configfs_depend_item() lo ..., Louis Rilling, (Wed Jan 28, 3:32 am)