From: Erez Zadok Date: Fri, 19 Sep 2008 03:20:58 +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=4ae399a3a2aa363764b844a50150610de71bd4a4;p=unionfs-2.6.23.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 b1a454a1c5c..4737be2e9f7 100644 --- a/fs/unionfs/inode.c +++ b/fs/unionfs/inode.c @@ -907,7 +907,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 */