|
@@ -1440,7 +1440,13 @@ void account_page_cleaned(struct page *page, struct address_space *mapping,
|
|
|
struct bdi_writeback *wb);
|
|
|
int set_page_dirty(struct page *page);
|
|
|
int set_page_dirty_lock(struct page *page);
|
|
|
-void cancel_dirty_page(struct page *page);
|
|
|
+void __cancel_dirty_page(struct page *page);
|
|
|
+static inline void cancel_dirty_page(struct page *page)
|
|
|
+{
|
|
|
+ /* Avoid atomic ops, locking, etc. when not actually needed. */
|
|
|
+ if (PageDirty(page))
|
|
|
+ __cancel_dirty_page(page);
|
|
|
+}
|
|
|
int clear_page_dirty_for_io(struct page *page);
|
|
|
|
|
|
int get_cmdline(struct task_struct *task, char *buffer, int buflen);
|