Skip to content

Commit f58977e

Browse files
author
Darrick J. Wong
committed
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> Reviewed-by: Dave Chinner <dchinner@redhat.com>
1 parent b996c9a commit f58977e

1 file changed

Lines changed: 8 additions & 10 deletions

File tree

fs/xfs/scrub/attr.c

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ xchk_xattr_buf_cleanup(
4444
static int
4545
xchk_setup_xattr_buf(
4646
struct xfs_scrub *sc,
47-
size_t value_size,
48-
gfp_t flags)
47+
size_t value_size)
4948
{
5049
size_t bmp_sz;
5150
struct xchk_xattr_buf *ab = sc->buf;
@@ -56,17 +55,17 @@ xchk_setup_xattr_buf(
5655
if (ab)
5756
goto resize_value;
5857

59-
ab = kvzalloc(sizeof(struct xchk_xattr_buf), flags);
58+
ab = kvzalloc(sizeof(struct xchk_xattr_buf), XCHK_GFP_FLAGS);
6059
if (!ab)
6160
return -ENOMEM;
6261
sc->buf = ab;
6362
sc->buf_cleanup = xchk_xattr_buf_cleanup;
6463

65-
ab->usedmap = kvmalloc(bmp_sz, flags);
64+
ab->usedmap = kvmalloc(bmp_sz, XCHK_GFP_FLAGS);
6665
if (!ab->usedmap)
6766
return -ENOMEM;
6867

69-
ab->freemap = kvmalloc(bmp_sz, flags);
68+
ab->freemap = kvmalloc(bmp_sz, XCHK_GFP_FLAGS);
7069
if (!ab->freemap)
7170
return -ENOMEM;
7271

@@ -80,7 +79,7 @@ xchk_setup_xattr_buf(
8079
ab->value_sz = 0;
8180
}
8281

83-
new_val = kvmalloc(value_size, flags);
82+
new_val = kvmalloc(value_size, XCHK_GFP_FLAGS);
8483
if (!new_val)
8584
return -ENOMEM;
8685

@@ -102,8 +101,7 @@ xchk_setup_xattr(
102101
* without the inode lock held, which means we can sleep.
103102
*/
104103
if (sc->flags & XCHK_TRY_HARDER) {
105-
error = xchk_setup_xattr_buf(sc, XATTR_SIZE_MAX,
106-
XCHK_GFP_FLAGS);
104+
error = xchk_setup_xattr_buf(sc, XATTR_SIZE_MAX);
107105
if (error)
108106
return error;
109107
}
@@ -181,7 +179,7 @@ xchk_xattr_listent(
181179
* doesn't work, we overload the seen_enough variable to convey
182180
* the error message back to the main scrub function.
183181
*/
184-
error = xchk_setup_xattr_buf(sx->sc, valuelen, XCHK_GFP_FLAGS);
182+
error = xchk_setup_xattr_buf(sx->sc, valuelen);
185183
if (error == -ENOMEM)
186184
error = -EDEADLOCK;
187185
if (error) {
@@ -354,7 +352,7 @@ xchk_xattr_block(
354352
return 0;
355353

356354
/* Allocate memory for block usage checking. */
357-
error = xchk_setup_xattr_buf(ds->sc, 0, XCHK_GFP_FLAGS);
355+
error = xchk_setup_xattr_buf(ds->sc, 0);
358356
if (error == -ENOMEM)
359357
return -EDEADLOCK;
360358
if (error)

0 commit comments

Comments
 (0)