summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/raid/md_k.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h
index e559fb701aa..12b3203e341 100644
--- a/include/linux/raid/md_k.h
+++ b/include/linux/raid/md_k.h
@@ -324,5 +324,10 @@ do { \
__wait_event_lock_irq(wq, condition, lock, cmd); \
} while (0)
+static inline void safe_put_page(struct page *p)
+{
+ if (p) put_page(p);
+}
+
#endif