summaryrefslogtreecommitdiffstats
path: root/include/linux/reiserfs_fs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/reiserfs_fs.h')
-rw-r--r--include/linux/reiserfs_fs.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index fa5dbf307c4..27f4ecc2818 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);
int reiserfs_write_lock_once(struct super_block *s);
void reiserfs_write_unlock_once(struct super_block *s, int lock_depth);
+/*
+ * When we schedule, we usually want to also release the write lock,
+ * according to the previous bkl based locking scheme of reiserfs.
+ */
+static inline void reiserfs_cond_resched(struct super_block *s)
+{
+ if (need_resched()) {
+ reiserfs_write_unlock(s);
+ schedule();
+ reiserfs_write_lock(s);
+ }
+}
+
struct fid;
/* in reading the #defines, it may help to understand that they employ