projects
/
dragonfly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
609f618
)
VFS accounting: small speed optimization
author
Francois Tigeot <ftigeot@wolfpond.org>
Wed, 28 Mar 2012 11:52:36 +0000 (13:52 +0200)
committer
François Tigeot <ftigeot@wolfpond.org>
Fri, 30 Mar 2012 06:47:31 +0000 (08:47 +0200)
* Some operations may end up using the accounting macro with an
effective zero bytes space usage difference
* Avoid calling the whole mess and its associated mount-point spinlock
in that case.
sys/sys/mount.h
patch
|
blob
|
blame
|
history
diff --git
a/sys/sys/mount.h
b/sys/sys/mount.h
index
dadd883
..
e3c3b1c
100644
(file)
--- a/
sys/sys/mount.h
+++ b/
sys/sys/mount.h
@@
-622,7
+622,7
@@
struct vfsops {
#define VFS_EXTATTRCTL(MP, C, FVP, NS, N, CRED) \
vfs_extattrctl(MP, C, FVP, NS, N, CRED)
#define VFS_ACCOUNT(MP, U, G, D) \
- if (MP->mnt_op->vfs_account != NULL) \
+ if ((MP->mnt_op->vfs_account != NULL) && (D != 0)) \
MP->mnt_op->vfs_account(MP, U, G, D);
#define VFS_NCPGEN_SET(MP, NCP) \
MP->mnt_op->vfs_ncpgen_set(MP, NCP)