Unionfs: don't printk an error if it's due to common copyup
authorErez Zadok <ezk@cs.sunysb.edu>
Thu, 1 Nov 2007 05:38:09 +0000 (01:38 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Thu, 1 Nov 2007 05:38:09 +0000 (01:38 -0400)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/inode.c
fs/unionfs/rename.c
fs/unionfs/subr.c

index 5ede4058e56bee776cd4a30d5e70d8597ba9f341..8fcf33cc291df437a4768fde8b84322735b6ac3e 100644 (file)
@@ -456,10 +456,11 @@ static int unionfs_symlink(struct inode *dir, struct dentry *dentry,
                        if (!lower_dentry || IS_ERR(lower_dentry)) {
                                if (IS_ERR(lower_dentry))
                                        err = PTR_ERR(lower_dentry);
-
-                               printk(KERN_ERR "unionfs: lower dentry "
-                                      "NULL (or error) for bindex = %d\n",
-                                      bindex);
+                               if (!IS_COPYUP_ERR(err))
+                                       printk(KERN_ERR
+                                              "unionfs: create_parents for "
+                                              "symlink failed: bindex=%d "
+                                              "err=%d\n", bindex, err);
                                continue;
                        }
                }
index b1b756c318400ddbfc897d0796d296ef82fbd3ef..c4dcf8faf202ab90181b85b6effbb4ee79c7a41c 100644 (file)
@@ -41,7 +41,7 @@ static int __unionfs_rename(struct inode *old_dir, struct dentry *old_dentry,
                                       bindex);
                if (IS_ERR(lower_new_dentry)) {
                        err = PTR_ERR(lower_new_dentry);
-                       if (err == -EROFS)
+                       if (IS_COPYUP_ERR(err))
                                goto out;
                        printk(KERN_ERR "unionfs: error creating directory "
                               "tree for rename, bindex=%d err=%d\n",
index 8e84c0b9f9447e8c18147d479ac3160217610499..48f00726207203e93f49aa0fad839d1097ccff3f 100644 (file)
@@ -60,8 +60,12 @@ int create_whiteout(struct dentry *dentry, int start)
                                                      dentry->d_name.name,
                                                      bindex);
                        if (!lower_dentry || IS_ERR(lower_dentry)) {
-                               printk(KERN_ERR "unionfs: create_parents "
-                                      "failed for bindex = %d\n", bindex);
+                               int ret = PTR_ERR(lower_dentry);
+                               if (!IS_COPYUP_ERR(ret))
+                                       printk(KERN_ERR
+                                              "unionfs: create_parents for "
+                                              "whiteout failed: bindex=%d "
+                                              "err=%d\n", bindex, ret);
                                continue;
                        }
                }