diff options
author | Nick Piggin <npiggin@suse.de> | 2009-03-31 18:23:21 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-01 11:59:14 -0400 |
commit | c2ec175c39f62949438354f603f4aa170846aabb (patch) | |
tree | f2c9bf1bec2deabe2d3a5092405b027637b6ead3 /fs/gfs2 | |
parent | c2fdf3a9b2d52842808a8e551b53b55dd9b45030 (diff) |
mm: page_mkwrite change prototype to match fault
Change the page_mkwrite prototype to take a struct vm_fault, and return
VM_FAULT_xxx flags. There should be no functional change.
This makes it possible to return much more detailed error information to
the VM (and also can provide more information eg. virtual_address to the
driver, which might be important in some special cases).
This is required for a subsequent fix. And will also make it easier to
merge page_mkwrite() with fault() in future.
Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Chris Mason <chris.mason@oracle.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Miklos Szeredi <miklos@szeredi.hu>
Cc: Steven Whitehouse <swhiteho@redhat.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <joel.becker@oracle.com>
Cc: Artem Bityutskiy <dedekind@infradead.org>
Cc: Felix Blyakher <felixb@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/gfs2')
-rw-r--r-- | fs/gfs2/ops_file.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/gfs2/ops_file.c b/fs/gfs2/ops_file.c index 3b9e8de3500b..70b9b8548945 100644 --- a/fs/gfs2/ops_file.c +++ b/fs/gfs2/ops_file.c | |||
@@ -337,8 +337,9 @@ static int gfs2_allocate_page_backing(struct page *page) | |||
337 | * blocks allocated on disk to back that page. | 337 | * blocks allocated on disk to back that page. |
338 | */ | 338 | */ |
339 | 339 | ||
340 | static int gfs2_page_mkwrite(struct vm_area_struct *vma, struct page *page) | 340 | static int gfs2_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) |
341 | { | 341 | { |
342 | struct page *page = vmf->page; | ||
342 | struct inode *inode = vma->vm_file->f_path.dentry->d_inode; | 343 | struct inode *inode = vma->vm_file->f_path.dentry->d_inode; |
343 | struct gfs2_inode *ip = GFS2_I(inode); | 344 | struct gfs2_inode *ip = GFS2_I(inode); |
344 | struct gfs2_sbd *sdp = GFS2_SB(inode); | 345 | struct gfs2_sbd *sdp = GFS2_SB(inode); |
@@ -412,6 +413,8 @@ out_unlock: | |||
412 | gfs2_glock_dq(&gh); | 413 | gfs2_glock_dq(&gh); |
413 | out: | 414 | out: |
414 | gfs2_holder_uninit(&gh); | 415 | gfs2_holder_uninit(&gh); |
416 | if (ret) | ||
417 | ret = VM_FAULT_SIGBUS; | ||
415 | return ret; | 418 | return ret; |
416 | } | 419 | } |
417 | 420 | ||