Are lock_super() and unlock_super() deprecated?
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 voidlock_super(struct super_block * sb)
356 {
357mutex_lock(&sb->s_lock);
358 }
Quoted 8 lines
359
360 voidunlock_super(struct super_block * sb)
361 {
362mutex_unlock(&sb->s_lock);
363 }
364
365EXPORT_SYMBOL(lock_super);
366EXPORT_SYMBOL(unlock_super);
Regards,
Dan
Signature · 2 lines
Dan Luedtke http://www.danrl.de
Quoted 4 lines · Dan Luedtke
Hello everyone,
short question: What am I supposed to use instead of
lock_super()andunlock_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.