summaryrefslogtreecommitdiffstats
path: root/module/zfs/arc.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2015-02-26 15:29:33 -0800
committerBrian Behlendorf <[email protected]>2015-03-03 10:46:40 -0800
commit4ec15b8dcf8038aeb15c7877c50d0fa500b468c6 (patch)
treed18f08bf6802a3148c4d74bd1e6e9d950c675523 /module/zfs/arc.c
parentd14cfd83dae0b1a261667acd416dba17a98d15fa (diff)
Use MUTEX_FSTRANS mutex type
There are regions in the ZFS code where it is desirable to be able to be set PF_FSTRANS while a specific mutex is held. The ZFS code could be updated to set/clear this flag in all the correct places, but this is undesirable for a few reasons. 1) It would require changes to a significant amount of the ZFS code. This would complicate applying patches from upstream. 2) It would be easy to accidentally miss a critical region in the initial patch or to have an future change introduce a new one. Both of these concerns can be addressed by using a new mutex type which is responsible for managing PF_FSTRANS, support for which was added to the SPL in commit zfsonlinux/spl@9099312 - Merge branch 'kmem-rework'. Signed-off-by: Brian Behlendorf <[email protected]> Signed-off-by: Tim Chase <[email protected]> Closes #3050 Closes #3055 Closes #3062 Closes #3132 Closes #3142 Closes #2983
Diffstat (limited to 'module/zfs/arc.c')
-rw-r--r--module/zfs/arc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/arc.c b/module/zfs/arc.c
index 800394c21..070d85aaf 100644
--- a/module/zfs/arc.c
+++ b/module/zfs/arc.c
@@ -928,7 +928,7 @@ retry:
for (i = 0; i < BUF_LOCKS; i++) {
mutex_init(&buf_hash_table.ht_locks[i].ht_lock,
- NULL, MUTEX_DEFAULT, NULL);
+ NULL, MUTEX_FSTRANS, NULL);
}
}