Unionfs: don't printk trivial message upon normal rename-copyup
authorErez Zadok <ezk@cs.sunysb.edu>
Wed, 17 Oct 2007 20:37:51 +0000 (16:37 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Tue, 13 Jan 2009 02:31:19 +0000 (21:31 -0500)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/rename.c

index 91d41d4ce8a80c4f991e06cb5c3a642cf7757b4d..1ab474fc953b228d9a8e6b4489fa0ed0802d7906 100644 (file)
@@ -40,10 +40,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;
                }
        }