Skip to content

Commit

Permalink
GFS2: Fix page_mkwrite() return code
Browse files Browse the repository at this point in the history
This allows for the possibility of returning VM_FAULT_OOM as
well as VM_FAULT_SIGBUS. This ensures that the correct action
is taken.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
  • Loading branch information
Steven Whitehouse committed Apr 20, 2009
1 parent 52fcd11 commit e56985d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/gfs2/ops_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,9 @@ static int gfs2_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
gfs2_glock_dq(&gh);
out:
gfs2_holder_uninit(&gh);
if (ret)
if (ret == -ENOMEM)
ret = VM_FAULT_OOM;
else if (ret)
ret = VM_FAULT_SIGBUS;
return ret;
}
Expand Down

0 comments on commit e56985d

Please sign in to comment.