summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2009-06-18 05:56:24 +0000
committeralc <alc@FreeBSD.org>2009-06-18 05:56:24 +0000
commitf0cb2be073e4d534642c7b5774af9533ee321fbc (patch)
treea4b9bdbde4715a42ca46219ba9aff29e55744737 /sys/fs
parent08a5e53744018d9a381623a79a5e329500acccc8 (diff)
downloadFreeBSD-src-f0cb2be073e4d534642c7b5774af9533ee321fbc.zip
FreeBSD-src-f0cb2be073e4d534642c7b5774af9533ee321fbc.tar.gz
Fix some of the style errors in *getpages().
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/nfsclient/nfs_clbio.c31
1 files changed, 13 insertions, 18 deletions
diff --git a/sys/fs/nfsclient/nfs_clbio.c b/sys/fs/nfsclient/nfs_clbio.c
index b355e60..1e7785b 100644
--- a/sys/fs/nfsclient/nfs_clbio.c
+++ b/sys/fs/nfsclient/nfs_clbio.c
@@ -198,7 +198,7 @@ ncl_getpages(struct vop_getpages_args *ap)
if ((object = vp->v_object) == NULL) {
ncl_printf("nfs_getpages: called with non-merged cache vnode??\n");
- return VM_PAGER_ERROR;
+ return (VM_PAGER_ERROR);
}
if (newnfs_directio_enable && !newnfs_directio_allow_mmap) {
@@ -206,7 +206,7 @@ ncl_getpages(struct vop_getpages_args *ap)
if ((np->n_flag & NNONCACHE) && (vp->v_type == VREG)) {
mtx_unlock(&np->n_mtx);
ncl_printf("nfs_getpages: called on non-cacheable vnode??\n");
- return VM_PAGER_ERROR;
+ return (VM_PAGER_ERROR);
} else
mtx_unlock(&np->n_mtx);
}
@@ -227,23 +227,18 @@ ncl_getpages(struct vop_getpages_args *ap)
* allow the pager to zero-out the blanks. Partially valid pages
* can only occur at the file EOF.
*/
-
- {
- vm_page_t m = pages[ap->a_reqpage];
-
- VM_OBJECT_LOCK(object);
- if (m->valid != 0) {
- vm_page_lock_queues();
- for (i = 0; i < npages; ++i) {
- if (i != ap->a_reqpage)
- vm_page_free(pages[i]);
- }
- vm_page_unlock_queues();
- VM_OBJECT_UNLOCK(object);
- return(0);
+ VM_OBJECT_LOCK(object);
+ if (pages[ap->a_reqpage]->valid != 0) {
+ vm_page_lock_queues();
+ for (i = 0; i < npages; ++i) {
+ if (i != ap->a_reqpage)
+ vm_page_free(pages[i]);
}
+ vm_page_unlock_queues();
VM_OBJECT_UNLOCK(object);
+ return (0);
}
+ VM_OBJECT_UNLOCK(object);
/*
* We use only the kva address for the buffer, but this is extremely
@@ -281,7 +276,7 @@ ncl_getpages(struct vop_getpages_args *ap)
}
vm_page_unlock_queues();
VM_OBJECT_UNLOCK(object);
- return VM_PAGER_ERROR;
+ return (VM_PAGER_ERROR);
}
/*
@@ -347,7 +342,7 @@ ncl_getpages(struct vop_getpages_args *ap)
}
vm_page_unlock_queues();
VM_OBJECT_UNLOCK(object);
- return 0;
+ return (0);
}
/*
OpenPOWER on IntegriCloud