Unionfs: don't printk trivial message upon normal rename-copyup
authorErez Zadok <ezk@cs.sunysb.edu>
Fri, 16 Nov 2007 18:45:33 +0000 (13:45 -0500)
committerRachita Kothiyal <rachita@dewey.fsl.cs.sunysb.edu>
Thu, 1 May 2008 23:03:14 +0000 (19:03 -0400)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/rename.c

index 6cc7923959367334168ce3e3c0d655befd7534d7..3e1adde8c04d97616ed18f6a37be65a27ca60768 100644 (file)
@@ -89,10 +89,12 @@ static int __unionfs_rename(struct inode *old_dir, struct dentry *old_dentry,
                                       new_dentry, new_dentry->d_name.name,
                                       bindex);
                if (IS_ERR(lower_new_dentry)) {
-                       printk(KERN_ERR "unionfs: error creating directory "
-                              "tree for rename, bindex = %d, err = %ld\n",
-                              bindex, PTR_ERR(lower_new_dentry));
                        err = PTR_ERR(lower_new_dentry);
+                       if (err == -EROFS)
+                               goto out;
+                       printk(KERN_ERR "unionfs: error creating directory "
+                              "tree for rename, bindex=%d err=%d\n",
+                              bindex, err);
                        goto out;
                }
        }