Skip to contentSkip to conversation

Are lock_super() and unlock_super() deprecated?

DISCUSSION Dan Luedtke 2 participants 2 messages Jun 17, 2012 VFS

lore
Share & tools
lore
#0 lore raw

Hello everyone,

short question: What am I supposed to use instead of lock_super() and unlock_super() in newly written filesystem drivers?

fs/super.c:

Quoted 7 lines

352 /*
353 * Superblock locking. We really ought to get rid of these two. 354 */
355 void lock_super(struct super_block * sb)
356 {
357 mutex_lock(&sb->s_lock);
358 }

Quoted 8 lines

359
360 void unlock_super(struct super_block * sb)
361 {
362 mutex_unlock(&sb->s_lock);
363 }
364
365 EXPORT_SYMBOL(lock_super);
366 EXPORT_SYMBOL(unlock_super);

Regards,
Dan

Signature · 2 lines
Dan Luedtke
http://www.danrl.de
#1 lore raw
Quoted 4 lines · Dan Luedtke

Hello everyone,

short question: What am I supposed to use instead of lock_super() and unlock_super() in newly written filesystem drivers?

Just use your own locking inside the filesystem. The direct replacement would be a mutex, but if it fits your design better anything else will work too.