mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
[PATCH] add AOP_TRUNCATED_PAGE, prepend AOP_ to WRITEPAGE_ACTIVATE
readpage(), prepare_write(), and commit_write() callers are updated to understand the special return code AOP_TRUNCATED_PAGE in the style of writepage() and WRITEPAGE_ACTIVATE. AOP_TRUNCATED_PAGE tells the caller that the callee has unlocked the page and that the operation should be tried again with a new page. OCFS2 uses this to detect and work around a lock inversion in its aop methods. There should be no change in behaviour for methods that don't return AOP_TRUNCATED_PAGE. WRITEPAGE_ACTIVATE is also prepended with AOP_ for consistency and they are made enums so that kerneldoc can be used to document their semantics. Signed-off-by: Zach Brown <[email protected]>
This commit is contained in:
parent
7063fbf226
commit
994fc28c7b
9 changed files with 113 additions and 45 deletions
|
|
@ -855,7 +855,7 @@ unlock:
|
|||
swap_free(swap);
|
||||
redirty:
|
||||
set_page_dirty(page);
|
||||
return WRITEPAGE_ACTIVATE; /* Return with the page locked */
|
||||
return AOP_WRITEPAGE_ACTIVATE; /* Return with the page locked */
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NUMA
|
||||
|
|
|
|||
Loading…
Reference in a new issue