[lkml]   [2009]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH 02/49] vfs: Add BUG_ON for delayed and unwritten flags in submit_bh()
    From: Aneesh Kumar K.V <>

    The BH_Delay and BH_Unwritten flags should never leak out to
    submit_bh(). So add some BUG_ON() checks to submit_bh so we can get a
    stack trace and determine how and why this might have happened.

    (Note that only XFS and ext4 use these buffer head flags, and XFS does
    not use submit_bh(). So this patch should only modify behavior for

    Signed-off-by: Aneesh Kumar K.V <>
    Signed-off-by: "Theodore Ts'o" <>
    fs/buffer.c | 2 ++
    1 files changed, 2 insertions(+), 0 deletions(-)

    diff --git a/fs/buffer.c b/fs/buffer.c
    index aed2977..ad01129 100644
    --- a/fs/buffer.c
    +++ b/fs/buffer.c
    @@ -2933,6 +2933,8 @@ int submit_bh(int rw, struct buffer_head * bh)
    + BUG_ON(buffer_delay(bh));
    + BUG_ON(buffer_unwritten(bh));

    * Mask in barrier bit for a write (could be either a WRITE or a

     \ /
      Last update: 2009-06-08 21:27    [W:0.021 / U:96.552 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site