mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
ceph: switch back to testing for NULL folio->private in ceph_dirty_folio
Willy requested that we change this back to warning on folio->private being non-NULl. He's trying to kill off the PG_private flag, and so we'd like to catch where it's non-NULL. Add a VM_WARN_ON_FOLIO (since it doesn't exist yet) and change over to using that instead of VM_BUG_ON_FOLIO along with testing the ->private pointer. [ xiubli: define VM_WARN_ON_FOLIO macro in case DEBUG_VM is disabled reported by kernel test robot <lkp@intel.com> ] Cc: Matthew Wilcox <willy@infradead.org> Signed-off-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Xiubo Li <xiubli@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
committed by
Ilya Dryomov
parent
7467b04418
commit
020bc44a9f
@@ -54,6 +54,15 @@ void dump_mm(const struct mm_struct *mm);
|
||||
} \
|
||||
unlikely(__ret_warn_once); \
|
||||
})
|
||||
#define VM_WARN_ON_FOLIO(cond, folio) ({ \
|
||||
int __ret_warn = !!(cond); \
|
||||
\
|
||||
if (unlikely(__ret_warn)) { \
|
||||
dump_page(&folio->page, "VM_WARN_ON_FOLIO(" __stringify(cond)")");\
|
||||
WARN_ON(1); \
|
||||
} \
|
||||
unlikely(__ret_warn); \
|
||||
})
|
||||
#define VM_WARN_ON_ONCE_FOLIO(cond, folio) ({ \
|
||||
static bool __section(".data.once") __warned; \
|
||||
int __ret_warn_once = !!(cond); \
|
||||
@@ -79,6 +88,7 @@ void dump_mm(const struct mm_struct *mm);
|
||||
#define VM_WARN_ON(cond) BUILD_BUG_ON_INVALID(cond)
|
||||
#define VM_WARN_ON_ONCE(cond) BUILD_BUG_ON_INVALID(cond)
|
||||
#define VM_WARN_ON_ONCE_PAGE(cond, page) BUILD_BUG_ON_INVALID(cond)
|
||||
#define VM_WARN_ON_FOLIO(cond, folio) BUILD_BUG_ON_INVALID(cond)
|
||||
#define VM_WARN_ON_ONCE_FOLIO(cond, folio) BUILD_BUG_ON_INVALID(cond)
|
||||
#define VM_WARN_ONCE(cond, format...) BUILD_BUG_ON_INVALID(cond)
|
||||
#define VM_WARN(cond, format...) BUILD_BUG_ON_INVALID(cond)
|
||||
|
Reference in New Issue
Block a user