Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 311204
b: refs/heads/master
c: 59c84ed
h: refs/heads/master
v: v3
  • Loading branch information
Jan Kara authored and Ben Myers committed Jun 21, 2012
1 parent 88c99dd commit b813b4b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 76d095388b040229ea1aad7dea45be0cfa20f589
refs/heads/master: 59c84ed0ddc11f1823b4a33ace4fbcc948261bb2
16 changes: 2 additions & 14 deletions trunk/fs/xfs/xfs_buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,7 @@ xfs_buf_alloc(
bp->b_length = numblks;
bp->b_io_length = numblks;
bp->b_flags = flags;

/*
* We do not set the block number here in the buffer because we have not
* finished initialising the buffer. We insert the buffer into the cache
* in this state, so this ensures that we are unable to do IO on a
* buffer that hasn't been fully initialised.
*/
bp->b_bn = XFS_BUF_DADDR_NULL;
bp->b_bn = blkno;
atomic_set(&bp->b_pin_count, 0);
init_waitqueue_head(&bp->b_waiters);

Expand Down Expand Up @@ -567,11 +560,6 @@ xfs_buf_get(
if (bp != new_bp)
xfs_buf_free(new_bp);

/*
* Now we have a workable buffer, fill in the block number so
* that we can do IO on it.
*/
bp->b_bn = blkno;
bp->b_io_length = bp->b_length;

found:
Expand Down Expand Up @@ -772,7 +760,7 @@ xfs_buf_get_uncached(
int error, i;
xfs_buf_t *bp;

bp = xfs_buf_alloc(target, 0, numblks, 0);
bp = xfs_buf_alloc(target, XFS_BUF_DADDR_NULL, numblks, 0);
if (unlikely(bp == NULL))
goto fail;

Expand Down

0 comments on commit b813b4b

Please sign in to comment.