Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ovl: don't remove non-empty opaque directory
When removing an opaque directory we can't just call rmdir() to check for emptiness, because the directory will need to be replaced with a whiteout. The replacement is done with RENAME_EXCHANGE, which doesn't check emptiness. Solution is just to check emptiness by reading the directory. In the future we could add a new rename flag to check for emptiness even for RENAME_EXCHANGE to optimize this case. Reported-by: Vincent Batts <[email protected]> Signed-off-by: Miklos Szeredi <[email protected]> Tested-by: Jordi Pujol Palomer <[email protected]> Fixes: 263b4a0 ("ovl: dont replace opaque dir") Cc: <[email protected]> # v4.0+
- Loading branch information