diff options
Diffstat (limited to 'include/linux/reiserfs_fs.h')
-rw-r--r-- | include/linux/reiserfs_fs.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index fa5dbf307c40..27f4ecc28180 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
@@ -62,6 +62,19 @@ void reiserfs_write_unlock(struct super_block *s); | |||
62 | int reiserfs_write_lock_once(struct super_block *s); | 62 | int reiserfs_write_lock_once(struct super_block *s); |
63 | void reiserfs_write_unlock_once(struct super_block *s, int lock_depth); | 63 | void reiserfs_write_unlock_once(struct super_block *s, int lock_depth); |
64 | 64 | ||
65 | /* | ||
66 | * When we schedule, we usually want to also release the write lock, | ||
67 | * according to the previous bkl based locking scheme of reiserfs. | ||
68 | */ | ||
69 | static inline void reiserfs_cond_resched(struct super_block *s) | ||
70 | { | ||
71 | if (need_resched()) { | ||
72 | reiserfs_write_unlock(s); | ||
73 | schedule(); | ||
74 | reiserfs_write_lock(s); | ||
75 | } | ||
76 | } | ||
77 | |||
65 | struct fid; | 78 | struct fid; |
66 | 79 | ||
67 | /* in reading the #defines, it may help to understand that they employ | 80 | /* in reading the #defines, it may help to understand that they employ |