From: Erez Zadok Date: Fri, 19 Sep 2008 01:49:47 +0000 (-0400) Subject: Unionfs: return EINVAL in setattr on error X-Git-Tag: unionfs-2.5~7 X-Git-Url: https://git.fsl.cs.stonybrook.edu/?a=commitdiff_plain;h=1a7182cf746942bf4b24bc8e5f37f2015f307e9e;p=unionfs-2.6.26.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 a33171d5549..36ceaafcfb4 100644 --- a/fs/unionfs/inode.c +++ b/fs/unionfs/inode.c @@ -914,7 +914,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 */