#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 | |
frederic weisbecker | frederic weisbecker | 50 | 100.00% | 1 | 100.00% |
Total | 50 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
frederic weisbecker | frederic weisbecker | 56 | 100.00% | 2 | 100.00% |
Total | 56 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
frederic weisbecker | frederic weisbecker | 39 | 58.21% | 1 | 50.00% |
jeff mahoney | jeff mahoney | 28 | 41.79% | 1 | 50.00% |
Total | 67 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
jeff mahoney | jeff mahoney | 32 | 61.54% | 1 | 50.00% |
frederic weisbecker | frederic weisbecker | 20 | 38.46% | 1 | 50.00% |
Total | 52 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
frederic weisbecker | frederic weisbecker | 31 | 93.94% | 1 | 50.00% |
jeff mahoney | jeff mahoney | 2 | 6.06% | 1 | 50.00% |
Total | 33 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
frederic weisbecker | frederic weisbecker | 33 | 100.00% | 1 | 100.00% |
Total | 33 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
frederic weisbecker | frederic weisbecker | 240 | 78.95% | 4 | 57.14% |
jeff mahoney | jeff mahoney | 62 | 20.39% | 1 | 14.29% |
al viro | al viro | 1 | 0.33% | 1 | 14.29% |
lucas de marchi | lucas de marchi | 1 | 0.33% | 1 | 14.29% |
Total | 304 | 100.00% | 7 | 100.00% |