diff options
author | kib <kib@FreeBSD.org> | 2009-04-04 12:19:52 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2009-04-04 12:19:52 +0000 |
commit | ec888841ec127e18d54b8ef4c4e280190c1245cc (patch) | |
tree | 747a769a8d72052863ae974060aba0147947f371 /sys/ufs/ffs | |
parent | f72ef579b2bcf1c9f2abd735735fe92b2f8ada15 (diff) | |
download | FreeBSD-src-ec888841ec127e18d54b8ef4c4e280190c1245cc.zip FreeBSD-src-ec888841ec127e18d54b8ef4c4e280190c1245cc.tar.gz |
When removing or renaming snaphost, do not delve into request_cleanup().
The later may need blocks from the underlying device that belongs
to normal files, that should not be locked while snap lock is held.
Reported and tested by: pho
MFC after: 1 month
Diffstat (limited to 'sys/ufs/ffs')
-rw-r--r-- | sys/ufs/ffs/ffs_softdep.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index 15ceef8..5d959ac4 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -3309,7 +3309,7 @@ newdirrem(bp, dp, ip, isrmdir, prevdirremp) * the number of freefile and freeblks structures. */ ACQUIRE_LOCK(&lk); - if (num_dirrem > max_softdeps / 2) + if (!(ip->i_flags & SF_SNAPSHOT) && num_dirrem > max_softdeps / 2) (void) request_cleanup(ITOV(dp)->v_mount, FLUSH_REMOVE); num_dirrem += 1; FREE_LOCK(&lk); |