aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2009-04-03 11:42:41 -0400
committerDavid Howells <dhowells@redhat.com>2009-04-03 11:42:41 -0400
commit6b9b3514aa188183e74049853be43380ad49314f (patch)
tree738f333421c2f57447dc4534ae83a19708e487cf /fs/nfs
parent9b3f26c9110dcea62716aca9b8c68ceb482227ef (diff)
NFS: Add comment banners to some NFS functions
Add comment banners to some NFS functions so that they can be modified by the NFS fscache patches for further information. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Steve Dickson <steved@redhat.com> Acked-by: Trond Myklebust <Trond.Myklebust@netapp.com> Acked-by: Al Viro <viro@zeniv.linux.org.uk> Tested-by: Daire Byrne <Daire.Byrne@framestore.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/file.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index 0abf3f331f56..f5bc54dccecb 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -409,6 +409,13 @@ static int nfs_write_end(struct file *file, struct address_space *mapping,
409 return copied; 409 return copied;
410} 410}
411 411
412/*
413 * Partially or wholly invalidate a page
414 * - Release the private state associated with a page if undergoing complete
415 * page invalidation
416 * - Called if either PG_private or PG_private_2 is set on the page
417 * - Caller holds page lock
418 */
412static void nfs_invalidate_page(struct page *page, unsigned long offset) 419static void nfs_invalidate_page(struct page *page, unsigned long offset)
413{ 420{
414 dfprintk(PAGECACHE, "NFS: invalidate_page(%p, %lu)\n", page, offset); 421 dfprintk(PAGECACHE, "NFS: invalidate_page(%p, %lu)\n", page, offset);
@@ -419,6 +426,12 @@ static void nfs_invalidate_page(struct page *page, unsigned long offset)
419 nfs_wb_page_cancel(page->mapping->host, page); 426 nfs_wb_page_cancel(page->mapping->host, page);
420} 427}
421 428
429/*
430 * Attempt to release the private state associated with a page
431 * - Called if either PG_private or PG_private_2 is set on the page
432 * - Caller holds page lock
433 * - Return true (may release page) or false (may not)
434 */
422static int nfs_release_page(struct page *page, gfp_t gfp) 435static int nfs_release_page(struct page *page, gfp_t gfp)
423{ 436{
424 dfprintk(PAGECACHE, "NFS: release_page(%p)\n", page); 437 dfprintk(PAGECACHE, "NFS: release_page(%p)\n", page);
@@ -427,6 +440,14 @@ static int nfs_release_page(struct page *page, gfp_t gfp)
427 return 0; 440 return 0;
428} 441}
429 442
443/*
444 * Attempt to clear the private state associated with a page when an error
445 * occurs that requires the cached contents of an inode to be written back or
446 * destroyed
447 * - Called if either PG_private or PG_private_2 is set on the page
448 * - Caller holds page lock
449 * - Return 0 if successful, -error otherwise
450 */
430static int nfs_launder_page(struct page *page) 451static int nfs_launder_page(struct page *page)
431{ 452{
432 struct inode *inode = page->mapping->host; 453 struct inode *inode = page->mapping->host;
@@ -451,6 +472,11 @@ const struct address_space_operations nfs_file_aops = {
451 .launder_page = nfs_launder_page, 472 .launder_page = nfs_launder_page,
452}; 473};
453 474
475/*
476 * Notification that a PTE pointing to an NFS page is about to be made
477 * writable, implying that someone is about to modify the page through a
478 * shared-writable mapping
479 */
454static int nfs_vm_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) 480static int nfs_vm_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
455{ 481{
456 struct page *page = vmf->page; 482 struct page *page = vmf->page;