Unionfs: drop branchcount on error
authorErez Zadok <ezk@cs.sunysb.edu>
Thu, 11 Sep 2008 03:41:18 +0000 (23:41 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Fri, 12 Aug 2011 02:38:38 +0000 (22:38 -0400)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/commonfops.c

index 58619709bc6e93cdd81e1d47c8518b605c76b3c8..51f10a23d28fb956c492030dfc163d748e0de171 100644 (file)
@@ -181,6 +181,7 @@ static int open_all_files(struct file *file)
                                    unionfs_lower_mnt_idx(dentry, bindex),
                                    file->f_flags);
                if (IS_ERR(lower_file)) {
+                       branchput(sb, bindex);
                        err = PTR_ERR(lower_file);
                        goto out;
                } else {