commit b2e31ab1586b8d46cd81b403d03a1b4c17f74927
Author: Erez Zadok <[EMAIL PROTECTED]>
Date:   Thu Sep 18 23:00:23 2008 -0400

    Unionfs: return EINVAL in setattr on error
    
    Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>

diff --git a/fs/unionfs/inode.c b/fs/unionfs/inode.c
index 22f2c32..62311d2 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 */
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs

Reply via email to