summaryrefslogtreecommitdiffstats
path: root/module/zfs/zfs_rlock.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2011-02-08 11:29:50 -0800
committerBrian Behlendorf <[email protected]>2011-02-10 09:27:21 -0800
commit3c4988c83e4f278cd6c8076f6cdb8e4858d05840 (patch)
tree90340c0bc67bd8634affdf9d7d29c59837e640e6 /module/zfs/zfs_rlock.c
parent3558fd73b5d863304102f6745c26e0b592aca60a (diff)
Add zp->z_is_zvol flag
A new flag is required for the zfs_rlock code to determine if it is operation of the zvol of zpl dataset. This used to be keyed off the zp->z_vnode, which was a hack to begin with, but with the removal of vnodes we needed a dedicated flag.
Diffstat (limited to 'module/zfs/zfs_rlock.c')
-rw-r--r--module/zfs/zfs_rlock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/module/zfs/zfs_rlock.c b/module/zfs/zfs_rlock.c
index 6709ce80b..9362fb4e8 100644
--- a/module/zfs/zfs_rlock.c
+++ b/module/zfs/zfs_rlock.c
@@ -112,14 +112,14 @@ zfs_range_lock_writer(znode_t *zp, rl_t *new)
* Range locking is also used by zvol and uses a
* dummied up znode. However, for zvol, we don't need to
* append or grow blocksize, and besides we don't have
- * a "sa" data or z_zfsvfs - so skip that processing.
+ * a "sa" data or zfs_sb_t - so skip that processing.
*
* Yes, this is ugly, and would be solved by not handling
* grow or append in range lock code. If that was done then
* we could make the range locking code generically available
* to other non-zfs consumers.
*/
- if (zp->z_vnode) { /* caller is ZPL */
+ if (!zp->z_is_zvol) { /* caller is ZPL */
/*
* If in append mode pick up the current end of file.
* This is done under z_range_lock to avoid races.