[PATCH 4/4] Unionfs: ensure we have lower dentries in d_iput

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <akpm@...>
Cc: <linux-kernel@...>, <linux-fsdevel@...>, <viro@...>, <hch@...>, Erez Zadok <ezk@...>
Date: Wednesday, January 9, 2008 - 10:16 pm

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
---
 fs/unionfs/dentry.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/fs/unionfs/dentry.c b/fs/unionfs/dentry.c
index d969640..cd15243 100644
--- a/fs/unionfs/dentry.c
+++ b/fs/unionfs/dentry.c
@@ -507,9 +507,10 @@ static void unionfs_d_iput(struct dentry *dentry, struct inode *inode)
 {
 	int bindex, rc;
 
+	BUG_ON(!dentry);
 	unionfs_read_lock(dentry->d_sb, UNIONFS_SMUTEX_CHILD);
 
-	if (dbstart(dentry) < 0)
+	if (!UNIONFS_D(dentry) || dbstart(dentry) < 0)
 		goto drop_lower_inodes;
 	for (bindex = dbstart(dentry); bindex <= dbend(dentry); bindex++) {
 		if (unionfs_lower_mnt_idx(dentry, bindex)) {
-- 
1.5.2.2

-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[GIT PULL -mm] 0/4 Unionfs updates/fixes/cleanups, Erez Zadok, (Wed Jan 9, 10:16 pm)
[PATCH 4/4] Unionfs: ensure we have lower dentries in d_iput, Erez Zadok, (Wed Jan 9, 10:16 pm)
[PATCH 2/4] Unionfs: mmap fixes, Erez Zadok, (Wed Jan 9, 10:16 pm)