commit 4402eb428c5c2b923cab01f42a48804e4639ea89
Author: Erez Zadok <[EMAIL PROTECTED]>
Date:   Fri Sep 19 16:06:50 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 56b0c35..ac49de7 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 */
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs

Reply via email to