summaryrefslogtreecommitdiffstats
path: root/module/zfs/zfs_znode.c
diff options
context:
space:
mode:
Diffstat (limited to 'module/zfs/zfs_znode.c')
-rw-r--r--module/zfs/zfs_znode.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/module/zfs/zfs_znode.c b/module/zfs/zfs_znode.c
index 23e090712..a7ef07cd5 100644
--- a/module/zfs/zfs_znode.c
+++ b/module/zfs/zfs_znode.c
@@ -1471,7 +1471,6 @@ top:
int
zfs_freesp(znode_t *zp, uint64_t off, uint64_t len, int flag, boolean_t log)
{
- struct inode *ip = ZTOI(zp);
dmu_tx_t *tx;
zfs_sb_t *zsb = ZTOZSB(zp);
zilog_t *zilog = zsb->z_log;
@@ -1493,15 +1492,6 @@ zfs_freesp(znode_t *zp, uint64_t off, uint64_t len, int flag, boolean_t log)
return (error);
}
- /*
- * Check for any locks in the region to be freed.
- */
- if (ip->i_flock && mandatory_lock(ip)) {
- uint64_t length = (len ? len : zp->z_size - off);
- if (!lock_may_write(ip, off, length))
- return (SET_ERROR(EAGAIN));
- }
-
if (len == 0) {
error = zfs_trunc(zp, off);
} else {