mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-24 07:40:52 +00:00
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
This commit is contained in:
parent
8933fa13b6
commit
bc364c4e99
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=190690
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user