Messages in this thread Patch in this message | | | Date | Sat, 14 Aug 2004 16:32:39 +0200 | From | Christoph Hellwig <> | Subject | [PATCH] BUG() on inconsistant dcache tree in may_delete |
| |
This can't happen with a sane filesystem (but is triggered by the buggy clearcase bin only kernel module), so let's better BUG_ON early.
Adopted from Al's patch in the RH tree.
--- 1.103/fs/namei.c 2004-07-13 16:08:53 +02:00 +++ edited/fs/namei.c 2004-08-14 16:09:16 +02:00 @@ -1094,8 +1094,12 @@ static inline int may_delete(struct inode *dir,struct dentry *victim,int isdir) { int error; - if (!victim->d_inode || victim->d_parent->d_inode != dir) + + if (!victim->d_inode) return -ENOENT; + + BUG_ON(victim->d_parent->d_inode != dir); + error = permission(dir,MAY_WRITE | MAY_EXEC, NULL); if (error) return error; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |