summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2022-08-04 13:12:23 -0700
committerDarrick J. Wong <djwong@kernel.org>2022-11-09 19:07:20 -0800
commitb3b1aeab0bdc14371a4dbce58e76c2207092ea51 (patch)
treef5c8012903093bb47fd25765232115dc548bb2fa
parent73d355c23e33fb3b041331fda07fee7207966c1d (diff)
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: Darrick J. Wong <djwong@kernel.org>
-rw-r--r--fs/xfs/scrub/attr.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/fs/xfs/scrub/attr.c b/fs/xfs/scrub/attr.c
index 1fdda20155a3..6c572a5ee10b 100644
--- a/fs/xfs/scrub/attr.c
+++ b/fs/xfs/scrub/attr.c
@@ -44,8 +44,7 @@ xchk_xattr_buf_cleanup(
static int
xchk_setup_xattr_buf(
struct xfs_scrub *sc,
- size_t value_size,
- gfp_t flags)
+ size_t value_size)
{
size_t bmp_sz;
struct xchk_xattr_buf *ab = sc->buf;
@@ -56,17 +55,17 @@ xchk_setup_xattr_buf(
if (ab)
goto resize_value;
- ab = kvzalloc(sizeof(struct xchk_xattr_buf), flags);
+ ab = kvzalloc(sizeof(struct xchk_xattr_buf), XCHK_GFP_FLAGS);
if (!ab)
return -ENOMEM;
sc->buf = ab;
sc->buf_cleanup = xchk_xattr_buf_cleanup;
- ab->usedmap = kvmalloc(bmp_sz, flags);
+ ab->usedmap = kvmalloc(bmp_sz, XCHK_GFP_FLAGS);
if (!ab->usedmap)
return -ENOMEM;
- ab->freemap = kvmalloc(bmp_sz, flags);
+ ab->freemap = kvmalloc(bmp_sz, XCHK_GFP_FLAGS);
if (!ab->freemap)
return -ENOMEM;
@@ -80,7 +79,7 @@ resize_value:
ab->value_sz = 0;
}
- new_val = kvmalloc(value_size, flags);
+ new_val = kvmalloc(value_size, XCHK_GFP_FLAGS);
if (!new_val)
return -ENOMEM;
@@ -102,8 +101,7 @@ xchk_setup_xattr(
* without the inode lock held, which means we can sleep.
*/
if (sc->flags & XCHK_TRY_HARDER) {
- error = xchk_setup_xattr_buf(sc, XATTR_SIZE_MAX,
- XCHK_GFP_FLAGS);
+ error = xchk_setup_xattr_buf(sc, XATTR_SIZE_MAX);
if (error)
return error;
}
@@ -175,7 +173,7 @@ xchk_xattr_listent(
* doesn't work, we overload the seen_enough variable to convey
* 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)
error = -EDEADLOCK;
if (error) {
@@ -348,7 +346,7 @@ xchk_xattr_block(
return 0;
/* 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)
return -EDEADLOCK;
if (error)