From: Erez Zadok Date: Wed, 17 Sep 2008 07:24:57 +0000 (-0400) Subject: Unionfs: return EINVAL in setattr on error X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=0c66360c8f3bde88652360d17e0940775e7cd862;p=unionfs-3.12.y.git Unionfs: return EINVAL in setattr on error Signed-off-by: Erez Zadok --- diff --git a/fs/unionfs/inode.c b/fs/unionfs/inode.c index dcf066c399c8..15e1e331d28d 100644 --- a/fs/unionfs/inode.c +++ b/fs/unionfs/inode.c @@ -904,7 +904,10 @@ static int unionfs_setattr(struct dentry *dentry, struct iattr *ia) ia->ia_valid &= ~ATTR_MODE; lower_dentry = unionfs_lower_dentry(dentry); - BUG_ON(!lower_dentry); /* should never happen after above revalidate */ + if (!lower_dentry) { /* should never happen after above revalidate */ + err = -EINVAL; + goto out; + } lower_inode = unionfs_lower_inode(inode); /* check if user has permission to change lower inode */