From: Erez Zadok Date: Thu, 10 Jan 2008 00:07:29 +0000 (-0500) Subject: Unionfs: ensure we have lower dentries in d_iput X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=e38601898905343b8923013c97b58b873e90e5ab;p=unionfs-lite.git Unionfs: ensure we have lower dentries in d_iput Signed-off-by: Erez Zadok --- diff --git a/fs/unionfs/dentry.c b/fs/unionfs/dentry.c index d9696409ea2..cd15243f045 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)) {