aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorZach Brown <zach.brown@oracle.com>2005-12-15 17:28:17 -0500
committerJoel Becker <joel.becker@oracle.com>2006-01-03 14:45:42 -0500
commit994fc28c7b1e697ac56befe4aecabf23f0689f46 (patch)
treeda36d162e9bd077e9b5be385b28e2db90475c263 /fs
parent7063fbf2261194f72ee75afca67b3b38b554b5fa (diff)
[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 <zach.brown@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/mpage.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/mpage.c b/fs/mpage.c
index c5adcdddf3cc..f1d2d02bd4c8 100644
--- a/fs/mpage.c
+++ b/fs/mpage.c
@@ -721,7 +721,7 @@ retry:
721 &last_block_in_bio, &ret, wbc, 721 &last_block_in_bio, &ret, wbc,
722 page->mapping->a_ops->writepage); 722 page->mapping->a_ops->writepage);
723 } 723 }
724 if (unlikely(ret == WRITEPAGE_ACTIVATE)) 724 if (unlikely(ret == AOP_WRITEPAGE_ACTIVATE))
725 unlock_page(page); 725 unlock_page(page);
726 if (ret || (--(wbc->nr_to_write) <= 0)) 726 if (ret || (--(wbc->nr_to_write) <= 0))
727 done = 1; 727 done = 1;