From 130aa44cbae9c598bb356b071a4fc94bb5954d15 Mon Sep 17 00:00:00 2001 From: Erez Zadok Date: Wed, 9 Jan 2008 19:15:30 -0500 Subject: [PATCH] Unionfs: ensure we have lower dentries in d_iput Signed-off-by: Erez Zadok --- fs/unionfs/dentry.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/unionfs/dentry.c b/fs/unionfs/dentry.c index 6b52c91f0da..01aa2c09710 100644 --- a/fs/unionfs/dentry.c +++ b/fs/unionfs/dentry.c @@ -498,9 +498,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)) { -- 2.43.0