• Tao Ma's avatar
    ocfs2: Use xs->bucket to set xattr value outside · 712e53e4
    Tao Ma authored
    A long time ago, xs->base is allocated a 4K size and all the contents
    in the bucket are copied to the it. Now we use ocfs2_xattr_bucket to
    abstract xattr bucket and xs->base is initialized to the start of the
    bu_bhs[0]. So xs->base + offset will overflow when the value root is
    stored outside the first block.
    
    Then why we can survive the xattr test by now? It is because we always
    read the bucket contiguously now and kernel mm allocate continguous
    memory for us. We are lucky, but we should fix it. So just get the
    right value root as other callers do.
    Signed-off-by: default avatarTao Ma <tao.ma@oracle.com>
    Acked-by: default avatarJoel Becker <joel.becker@oracle.com>
    Signed-off-by: default avatarMark Fasheh <mfasheh@suse.com>
    712e53e4
xattr.c 142 KB