mm: Add pagemap.h to the fine documentation
Subsystems (4)
Matthew Wilcox
maintainerPATCH 1/1 mm: Add pagemap.h to the fine documentation
From: "Matthew Wilcox (Oracle)" <[email protected]>
The documentation currently does not include the deathless prose written to describe functions in pagemap.h because it's not included in any rst file. Fix up the mismatches between parameter names and the documentation and add the file to mm-api.
--- Documentation/core-api/mm-api.rst | 3 +++ include/linux/pagemap.h | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-)
Documentation/core-api/mm-api.rst +3 -0
@@ -73,6 +73,9 @@ File Mapping and Page Cache .. kernel-doc:: mm/truncate.c :export: +.. kernel-doc:: include/linux/pagemap.h + :internal: + Memory pools ============
include/linux/pagemap.h +4 -4
@@ -33,8 +33,8 @@ enum mapping_flags {/** * mapping_set_error - record a writeback error in the address_space -* @mapping - the mapping in which an error should be set -* @error - the error to set in the mapping +* @mapping: the mapping in which an error should be set +* @error: the error to set in the mapping * * When writeback fails in some way, we must record that error so that * userspace can be informed when fsync and the like are called. We endeavor
@@ -305,9 +305,9 @@ static inline struct page *find_lock_page(struct address_space *mapping,* atomic allocation! */ static inline struct page *find_or_create_page (struct address_space *mapping, -pgoff_t offset,gfp_t gfp_mask) +pgoff_t index,gfp_t gfp_mask) { -return pagecache_get_page (mapping, offset, +return pagecache_get_page (mapping, index,FGP_LOCK |FGP_ACCESSED |FGP_CREAT , gfp_mask); }
Signature · 1 line
2.25.0
Quoted 56 lines · Matthew Wilcox
From: "Matthew Wilcox (Oracle)" <[email protected]>
The documentation currently does not include the deathless prose written to describe functions in
pagemap.hbecause it's not included in any rst file. Fix up the mismatches between parameter names and the documentation and add the file to mm-api.Signed-off-by Matthew Wilcox (Oracle) <[email protected]>--- Documentation/core-api/mm-api.rst | 3 +++ include/linux/pagemap.h | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-)Documentation/core-api/mm-api.rst +3
-0@@ -73,6 +73,9 @@ File Mapping and Page Cache .. kernel-doc:: mm/truncate.c :export: +.. kernel-doc:: include/linux/pagemap.h + :internal: + Memory pools ============include/linux/pagemap.h +4
-4@@ -33,8 +33,8 @@ enum mapping_flags {/** * mapping_set_error - record a writeback error in the address_space -* @mapping - the mapping in which an error should be set -* @error - the error to set in the mapping +* @mapping: the mapping in which an error should be set +* @error: the error to set in the mapping * * When writeback fails in some way, we must record that error so that * userspace can be informed when fsync and the like are called. We endeavor @@ -305,9 +305,9 @@ static inline struct page *find_lock_page(struct address_space *mapping,* atomic allocation! */ static inline struct page *find_or_create_page (struct address_space *mapping, -pgoff_t offset,gfp_t gfp_mask) +pgoff_t index,gfp_t gfp_mask) { -return pagecache_get_page (mapping, offset, +return pagecache_get_page (mapping, index,FGP_LOCK |FGP_ACCESSED |FGP_CREAT , gfp_mask); }Signature · 1 line
2.25.0
Looks good to me. Thanks.
--
Best Regards,
Yan Zi
Quoted 3 lines · Matthew Wilcox
From: "Matthew Wilcox (Oracle)" <[email protected]>
The documentation currently does not include the deathless prose
Yea, documentation!
Quoted 2 lines
written to describe functions in
pagemap.hbecause it's not included in any rst file. Fix up the mismatches between parameter names and the
Maybe "Fix up some of the mismatches"? ...below:
Quoted 38 lines
documentation and add the file to mm-api.
Signed-off-by Matthew Wilcox (Oracle) <[email protected]>--- Documentation/core-api/mm-api.rst | 3 +++ include/linux/pagemap.h | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-)Documentation/core-api/mm-api.rst +3
-0@@ -73,6 +73,9 @@ File Mapping and Page Cache .. kernel-doc:: mm/truncate.c :export: +.. kernel-doc:: include/linux/pagemap.h + :internal: + Memory pools ============include/linux/pagemap.h +2
-2@@ -33,8 +33,8 @@ enum mapping_flags {/** * mapping_set_error - record a writeback error in the address_space -* @mapping - the mapping in which an error should be set -* @error - the error to set in the mapping +* @mapping: the mapping in which an error should be set +* @error: the error to set in the mapping * * When writeback fails in some way, we must record that error so that * userspace can be informed when fsync and the like are called. We endeavor
include/linux/pagemap.h static inline struct page *find_lock_page(struct address_space *mapping, · line 312
Quoted 10 lines
include/linux/pagemap.h +2
-2@@ -305,9 +305,9 @@ static inline struct page *find_lock_page(struct address_space *mapping,* atomic allocation! */ static inline struct page *find_or_create_page (struct address_space *mapping, -pgoff_t offset,gfp_t gfp_mask) +pgoff_t index,gfp_t gfp_mask) { -return pagecache_get_page (mapping, offset, +return pagecache_get_page (mapping, index,FGP_LOCK |FGP_ACCESSED |FGP_CREAT , gfp_mask);
...for example, the called function itself, pagecache_get_page(), declares its second arg with a name of "offset".
Not that it needs to affect this patch, but just to note that I think we might be at this for a while. :)
Anyway, I also ran 'make htmldocs' on this and poked around, and everything looks like it should, so:
thanks,
Signature · 2 lines
John Hubbard NVIDIA
Quoted 2 lines
include/linux/pagemap.h +0
-0}
Matthew Wilcox
maintainerQuoted 11 lines · John Hubbard
Quoted 3 lines · Matthew Wilcox
From: "Matthew Wilcox (Oracle)" <[email protected]>
The documentation currently does not include the deathless prose
Yea, documentation!
Quoted 2 lines
written to describe functions in
pagemap.hbecause it's not included in any rst file. Fix up the mismatches between parameter names and theMaybe "Fix up some of the mismatches"? ...below:
Nono, it fixes up all the _sphinx warnings_. Not our grand plan to rename the world ;-)
Quoted 4 lines
Anyway, I also ran 'make htmldocs' on this and poked around, and everything looks like it should, so:
Reviewed-by John Hubbard <[email protected]>
Thanks! Jon, do you want to take this through your tree? I know I tagged it as mm, but this seems more like a doc patch than an mm patch.