Commit f58977ed authored by Darrick J. Wong's avatar Darrick J. Wong

xfs: remove flags argument from xchk_setup_xattr_buf

All callers pass XCHK_GFP_FLAGS as the flags argument to
xchk_setup_xattr_buf, so get rid of the argument.
Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
parent b996c9a8
...@@ -44,8 +44,7 @@ xchk_xattr_buf_cleanup( ...@@ -44,8 +44,7 @@ xchk_xattr_buf_cleanup(
static int static int
xchk_setup_xattr_buf( xchk_setup_xattr_buf(
struct xfs_scrub *sc, struct xfs_scrub *sc,
size_t value_size, size_t value_size)
gfp_t flags)
{ {
size_t bmp_sz; size_t bmp_sz;
struct xchk_xattr_buf *ab = sc->buf; struct xchk_xattr_buf *ab = sc->buf;
...@@ -56,17 +55,17 @@ xchk_setup_xattr_buf( ...@@ -56,17 +55,17 @@ xchk_setup_xattr_buf(
if (ab) if (ab)
goto resize_value; goto resize_value;
ab = kvzalloc(sizeof(struct xchk_xattr_buf), flags); ab = kvzalloc(sizeof(struct xchk_xattr_buf), XCHK_GFP_FLAGS);
if (!ab) if (!ab)
return -ENOMEM; return -ENOMEM;
sc->buf = ab; sc->buf = ab;
sc->buf_cleanup = xchk_xattr_buf_cleanup; sc->buf_cleanup = xchk_xattr_buf_cleanup;
ab->usedmap = kvmalloc(bmp_sz, flags); ab->usedmap = kvmalloc(bmp_sz, XCHK_GFP_FLAGS);
if (!ab->usedmap) if (!ab->usedmap)
return -ENOMEM; return -ENOMEM;
ab->freemap = kvmalloc(bmp_sz, flags); ab->freemap = kvmalloc(bmp_sz, XCHK_GFP_FLAGS);
if (!ab->freemap) if (!ab->freemap)
return -ENOMEM; return -ENOMEM;
...@@ -80,7 +79,7 @@ xchk_setup_xattr_buf( ...@@ -80,7 +79,7 @@ xchk_setup_xattr_buf(
ab->value_sz = 0; ab->value_sz = 0;
} }
new_val = kvmalloc(value_size, flags); new_val = kvmalloc(value_size, XCHK_GFP_FLAGS);
if (!new_val) if (!new_val)
return -ENOMEM; return -ENOMEM;
...@@ -102,8 +101,7 @@ xchk_setup_xattr( ...@@ -102,8 +101,7 @@ xchk_setup_xattr(
* without the inode lock held, which means we can sleep. * without the inode lock held, which means we can sleep.
*/ */
if (sc->flags & XCHK_TRY_HARDER) { if (sc->flags & XCHK_TRY_HARDER) {
error = xchk_setup_xattr_buf(sc, XATTR_SIZE_MAX, error = xchk_setup_xattr_buf(sc, XATTR_SIZE_MAX);
XCHK_GFP_FLAGS);
if (error) if (error)
return error; return error;
} }
...@@ -181,7 +179,7 @@ xchk_xattr_listent( ...@@ -181,7 +179,7 @@ xchk_xattr_listent(
* doesn't work, we overload the seen_enough variable to convey * doesn't work, we overload the seen_enough variable to convey
* the error message back to the main scrub function. * the error message back to the main scrub function.
*/ */
error = xchk_setup_xattr_buf(sx->sc, valuelen, XCHK_GFP_FLAGS); error = xchk_setup_xattr_buf(sx->sc, valuelen);
if (error == -ENOMEM) if (error == -ENOMEM)
error = -EDEADLOCK; error = -EDEADLOCK;
if (error) { if (error) {
...@@ -354,7 +352,7 @@ xchk_xattr_block( ...@@ -354,7 +352,7 @@ xchk_xattr_block(
return 0; return 0;
/* Allocate memory for block usage checking. */ /* Allocate memory for block usage checking. */
error = xchk_setup_xattr_buf(ds->sc, 0, XCHK_GFP_FLAGS); error = xchk_setup_xattr_buf(ds->sc, 0);
if (error == -ENOMEM) if (error == -ENOMEM)
return -EDEADLOCK; return -EDEADLOCK;
if (error) if (error)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment