Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1212168
| From | Trond Myklebust <trond.myklebust@primarydata.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] nfs:Fix error handling in the function nfs_vm_page_mkwrite |
| Date | 2015-08-24 15:20 +0200 |
| Message-ID | <q0ZPl-kn-27@gated-at.bofh.it> (permalink) |
| References | <q0ZPl-kn-29@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sat, Aug 22, 2015 at 6:34 PM, Nicholas Krause <xerofoify@gmail.com> wrote: > This fixes error handling in the function nfs_vm_page_mkwrite to > properly check if the function wait_on_bit_action returned something > other then zero as if so return to the caller of nfs_vm_page_mkwrite > to signal that a internal failure has occurred when calling this > function and should be handled by the caller. > > Signed-off-by: Nicholas Krause <xerofoify@gmail.com> > --- > fs/nfs/file.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/fs/nfs/file.c b/fs/nfs/file.c > index cc4fa1e..698851a 100644 > --- a/fs/nfs/file.c > +++ b/fs/nfs/file.c > @@ -612,8 +612,10 @@ static int nfs_vm_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) > /* make sure the cache has finished storing the page */ > nfs_fscache_wait_on_page_write(NFS_I(inode), page); > > - wait_on_bit_action(&NFS_I(inode)->flags, NFS_INO_INVALIDATING, > - nfs_wait_bit_killable, TASK_KILLABLE); > + ret = wait_on_bit_action(&NFS_I(inode)->flags, NFS_INO_INVALIDATING, > + nfs_wait_bit_killable, TASK_KILLABLE); > + if (ret) > + goto out; > > lock_page(page); > mapping = page_file_mapping(page); > -- > 2.1.4 > nfs_vm_page_mkwrite() is only allowed to return the value '0' or one or more of the VM_FAULT_* flags. It may not return kernel error values. Trond -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH] nfs:Fix error handling in the function nfs_vm_page_mkwrite Trond Myklebust <trond.myklebust@primarydata.com> - 2015-08-24 15:20 +0200
csiph-web