summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/jbd2.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h
index a53a00d36228..64392baf5f4b 100644
--- a/include/linux/jbd2.h
+++ b/include/linux/jbd2.h
@@ -445,6 +445,20 @@ struct jbd2_inode {
loff_t i_dirty_end;
};
+static inline bool jbd2_jinode_get_dirty_range(const struct jbd2_inode *jinode,
+ loff_t *start, loff_t *end)
+{
+ loff_t start_byte = jinode->i_dirty_start;
+ loff_t end_byte = jinode->i_dirty_end;
+
+ if (!end_byte)
+ return false;
+
+ *start = start_byte;
+ *end = end_byte;
+ return true;
+}
+
struct jbd2_revoke_table_s;
/**