diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 16:37:42 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 17:09:51 -0800 |
| commit | bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch) | |
| tree | 01fdd9d27f1b272bef0127966e08eac44d134d0a /fs/ceph | |
| parent | e19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff) | |
Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
This was done entirely with mindless brute force, using
git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' |
xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/'
to convert the new alloc_obj() users that had a simple GFP_KERNEL
argument to just drop that argument.
Note that due to the extreme simplicity of the scripting, any slightly
more complex cases spread over multiple lines would not be triggered:
they definitely exist, but this covers the vast bulk of the cases, and
the resulting diff is also then easier to check automatically.
For the same reason the 'flex' versions will be done as a separate
conversion.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ceph')
| -rw-r--r-- | fs/ceph/caps.c | 2 | ||||
| -rw-r--r-- | fs/ceph/crypto.c | 4 | ||||
| -rw-r--r-- | fs/ceph/file.c | 2 | ||||
| -rw-r--r-- | fs/ceph/quota.c | 2 | ||||
| -rw-r--r-- | fs/ceph/super.c | 6 |
5 files changed, 8 insertions, 8 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 5d7c2ffae8fa..d51454e995a8 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -2395,7 +2395,7 @@ static int flush_mdlog_and_wait_inode_unsafe_requests(struct inode *inode) mutex_lock(&mdsc->mutex); max_sessions = mdsc->max_sessions; - sessions = kzalloc_objs(s, max_sessions, GFP_KERNEL); + sessions = kzalloc_objs(s, max_sessions); if (!sessions) { mutex_unlock(&mdsc->mutex); err = -ENOMEM; diff --git a/fs/ceph/crypto.c b/fs/ceph/crypto.c index 643c8ba28ae7..f3de43ccb470 100644 --- a/fs/ceph/crypto.c +++ b/fs/ceph/crypto.c @@ -50,7 +50,7 @@ static int ceph_crypt_set_context(struct inode *inode, const void *ctx, if (len > FSCRYPT_SET_CONTEXT_MAX_SIZE) return -EINVAL; - cfa = kzalloc_obj(*cfa, GFP_KERNEL); + cfa = kzalloc_obj(*cfa); if (!cfa) return -ENOMEM; @@ -112,7 +112,7 @@ int ceph_fscrypt_prepare_context(struct inode *dir, struct inode *inode, if (!encrypted) return 0; - as->fscrypt_auth = kzalloc_obj(*as->fscrypt_auth, GFP_KERNEL); + as->fscrypt_auth = kzalloc_obj(*as->fscrypt_auth); if (!as->fscrypt_auth) return -ENOMEM; diff --git a/fs/ceph/file.c b/fs/ceph/file.c index fdbf4aeaa408..66bbf6d517a9 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c @@ -1572,7 +1572,7 @@ ceph_direct_read_write(struct kiocb *iocb, struct iov_iter *iter, */ if (pos == iocb->ki_pos && !is_sync_kiocb(iocb) && (len == count || pos + count <= i_size_read(inode))) { - aio_req = kzalloc_obj(*aio_req, GFP_KERNEL); + aio_req = kzalloc_obj(*aio_req); if (aio_req) { aio_req->iocb = iocb; aio_req->write = write; diff --git a/fs/ceph/quota.c b/fs/ceph/quota.c index 514da29469b8..4dc9426643e8 100644 --- a/fs/ceph/quota.c +++ b/fs/ceph/quota.c @@ -103,7 +103,7 @@ find_quotarealm_inode(struct ceph_mds_client *mdsc, u64 ino) } if (!qri || (qri->ino != ino)) { /* Not found, create a new one and insert it */ - qri = kmalloc_obj(*qri, GFP_KERNEL); + qri = kmalloc_obj(*qri); if (qri) { qri->ino = ino; qri->inode = NULL; diff --git a/fs/ceph/super.c b/fs/ceph/super.c index 57320e830eda..2aed6b3359b6 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c @@ -809,7 +809,7 @@ static struct ceph_fs_client *create_fs_client(struct ceph_mount_options *fsopt, struct ceph_fs_client *fsc; int err; - fsc = kzalloc_obj(*fsc, GFP_KERNEL); + fsc = kzalloc_obj(*fsc); if (!fsc) { err = -ENOMEM; goto fail; @@ -1429,7 +1429,7 @@ static int ceph_init_fs_context(struct fs_context *fc) struct ceph_parse_opts_ctx *pctx; struct ceph_mount_options *fsopt; - pctx = kzalloc_obj(*pctx, GFP_KERNEL); + pctx = kzalloc_obj(*pctx); if (!pctx) return -ENOMEM; @@ -1437,7 +1437,7 @@ static int ceph_init_fs_context(struct fs_context *fc) if (!pctx->copts) goto nomem; - pctx->opts = kzalloc_obj(*pctx->opts, GFP_KERNEL); + pctx->opts = kzalloc_obj(*pctx->opts); if (!pctx->opts) goto nomem; |
