From: Erez Zadok Date: Fri, 19 Sep 2008 05:28:37 +0000 (-0400) Subject: Unionfs: return EINVAL in setattr on error X-Git-Tag: unionfs-2.5~7 X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=f129b92e066df4de1fc888688764a9cdbca08804;p=unionfs-2.6.20.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 8c0da3f9e9c..097fa6aade1 100644 --- a/fs/unionfs/inode.c +++ b/fs/unionfs/inode.c @@ -895,7 +895,10 @@ static int unionfs_setattr(struct dentry *dentry, struct iattr *ia) inode = dentry->d_inode; 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 */