]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/vfs/vfs_journal.c
xnu-1504.7.4.tar.gz
[apple/xnu.git] / bsd / vfs / vfs_journal.c
index 30230cf0953bf5d409a7d13bfe9c1872d7d46581..7ff95f4788c8fa6e8cb593338b497a9a9fdb06ea 100644 (file)
@@ -2486,6 +2486,8 @@ journal_modify_block_abort(journal *jnl, struct buf *bp)
        }
 
     if (jnl->flags & JOURNAL_INVALID) {
        }
 
     if (jnl->flags & JOURNAL_INVALID) {
+       /* Still need to buf_brelse(). Callers assume we consume the bp. */
+       buf_brelse(bp);
                return EINVAL;
     }
 
                return EINVAL;
     }
 
@@ -2541,6 +2543,8 @@ journal_modify_block_end(journal *jnl, struct buf *bp, void (*func)(struct buf *
     CHECK_JOURNAL(jnl);
 
     if (jnl->flags & JOURNAL_INVALID) {
     CHECK_JOURNAL(jnl);
 
     if (jnl->flags & JOURNAL_INVALID) {
+       /* Still need to buf_brelse(). Callers assume we consume the bp. */
+       buf_brelse(bp);
                return EINVAL;
     }
 
                return EINVAL;
     }