lkml.org 
[lkml]   [2004]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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/
\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.020 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site