Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vfs: fix incorrect dentry_update_name_case() BUG_ON() test
The case we should be verifying when updating the dentry name is that the _parent_ inode (the directory) semaphore is held, not the semaphore for the dentry itself. It's the directory locking that rename and readdir() etc all care about. The comment just above even says so - but then the BUG_ON() still checked the dentry inode itself. Very few people noticed, because this helper function really isn't used for very much, so you had to be using ncpfs to ever hit it. I think I should just remove the BUG_ON (the function really has just one user), but let's run with it fixed for a while before getting rid of it entirely. Reported-and-tested-by: Bongani Hlope <[email protected]> Reported-and-tested-by: Bernd Feige <[email protected]> Cc: Petr Vandrovec <[email protected]>, Cc: Arnd Bergmann <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Nick Piggin <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information