#include "reiserfs.h" #include <linux/mutex.h> /* * The previous reiserfs locking scheme was heavily based on * the tricky properties of the Bkl: * * - it was acquired recursively by a same task * - the performances relied on the release-while-schedule() property * * Now that we replace it by a mutex, we still want to keep the same * recursive property to avoid big changes in the code structure. * We use our own lock_owner here because the owner field on a mutex * is only available in SMP or mutex debugging, also we only need this field * for this mutex, no need for a system wide mutex facility. * * Also this lock is often released before a call that could block because * reiserfs performances were partially based on the release while schedule() * property of the Bkl. */
void reiserfs_write_lock(struct super_block *s) { struct reiserfs_sb_info *sb_i = REISERFS_SB(s); if (sb_i->lock_owner != current) { mutex_lock(&sb_i->lock); sb_i->lock_owner = current; } /* No need to protect it, only the current task touches it */ sb_i->lock_depth++; }Contributors
Person | Tokens | Prop | Commits | CommitProp |
Frédéric Weisbecker | 50 | 100.00% | 1 | 100.00% |
Total | 50 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Frédéric Weisbecker | 56 | 100.00% | 2 | 100.00% |
Total | 56 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Frédéric Weisbecker | 39 | 58.21% | 1 | 50.00% |
Jeff Mahoney | 28 | 41.79% | 1 | 50.00% |
Total | 67 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Jeff Mahoney | 32 | 61.54% | 1 | 50.00% |
Frédéric Weisbecker | 20 | 38.46% | 1 | 50.00% |
Total | 52 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Frédéric Weisbecker | 31 | 93.94% | 1 | 50.00% |
Jeff Mahoney | 2 | 6.06% | 1 | 50.00% |
Total | 33 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Frédéric Weisbecker | 33 | 100.00% | 1 | 100.00% |
Total | 33 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Frédéric Weisbecker | 240 | 78.95% | 4 | 57.14% |
Jeff Mahoney | 62 | 20.39% | 1 | 14.29% |
Lucas De Marchi | 1 | 0.33% | 1 | 14.29% |
Al Viro | 1 | 0.33% | 1 | 14.29% |
Total | 304 | 100.00% | 7 | 100.00% |