The following steps can reproduce the NPE:
1. create a snapshot on /
2. move /foo/file1 to /bar/
3. rename /foo/file2 to /bar/file1 with the OVERWRITE option
After step 2, /bar/file1 is a DstReference inode. In step 3, FSDirectory#unprotectedRename first detaches the DstReference inode from the WithCount inode, then it still calls the cleanSubtree method of the corresponding INodeFile instance, which triggers the NPE. We should follow the same logic in FSDirectory#unprotectedDelete which skips the cleanSubtree call in this scenario.