diff options
| author | Kirk McKusick <mckusick@FreeBSD.org> | 2011-07-10 05:34:49 +0000 |
|---|---|---|
| committer | Kirk McKusick <mckusick@FreeBSD.org> | 2011-07-10 05:34:49 +0000 |
| commit | 17ff0cf70f03f0ef7a127a14ca7d121c6eb859bf (patch) | |
| tree | 53ed80e4d3c3e8bc016f47cacded636090628463 | |
| parent | b115b0e28f496c9ec26a3a15db7398a0d5d89c66 (diff) | |
Notes
| -rw-r--r-- | sys/ufs/ffs/ffs_alloc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c index 6d27ace13c7ee..357b152fcb26e 100644 --- a/sys/ufs/ffs/ffs_alloc.c +++ b/sys/ufs/ffs/ffs_alloc.c @@ -2038,7 +2038,11 @@ ffs_blkfree(ump, fs, devvp, bno, size, inum, vtype, dephd) ffs_snapblkfree(fs, devvp, bno, size, inum, vtype, dephd)) { return; } - if (!ump->um_candelete) { + /* + * Nothing to delay if TRIM is disabled, or the operation is + * performed on the snapshot. + */ + if (!ump->um_candelete || devvp->v_type == VREG) { ffs_blkfree_cg(ump, fs, devvp, bno, size, inum, dephd); return; } |
