Skip to content

Commit

Permalink
fs: rename struct xattr_ctx to kernel_xattr_ctx
Browse files Browse the repository at this point in the history
Rename the struct xattr_ctx to increase distinction with the about to be
added user API struct xattr_args.

No functional change.

Suggested-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Link: https://lore.kernel.org/r/20240426162042.191916-2-cgoettsche@seltendoof.de
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Christian Göttsche authored and Al Viro committed Nov 6, 2024
1 parent a718743 commit 537c766
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions fs/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ struct xattr_name {
char name[XATTR_NAME_MAX + 1];
};

struct xattr_ctx {
struct kernel_xattr_ctx {
/* Value of attribute */
union {
const void __user *cvalue;
Expand All @@ -283,11 +283,11 @@ struct xattr_ctx {

ssize_t do_getxattr(struct mnt_idmap *idmap,
struct dentry *d,
struct xattr_ctx *ctx);
struct kernel_xattr_ctx *ctx);

int setxattr_copy(const char __user *name, struct xattr_ctx *ctx);
int setxattr_copy(const char __user *name, struct kernel_xattr_ctx *ctx);
int do_setxattr(struct mnt_idmap *idmap, struct dentry *dentry,
struct xattr_ctx *ctx);
struct kernel_xattr_ctx *ctx);
int may_write_xattr(struct mnt_idmap *idmap, struct inode *inode);

#ifdef CONFIG_FS_POSIX_ACL
Expand Down
12 changes: 6 additions & 6 deletions fs/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ EXPORT_SYMBOL_GPL(vfs_removexattr);
* Extended attribute SET operations
*/

int setxattr_copy(const char __user *name, struct xattr_ctx *ctx)
int setxattr_copy(const char __user *name, struct kernel_xattr_ctx *ctx)
{
int error;

Expand Down Expand Up @@ -620,7 +620,7 @@ int setxattr_copy(const char __user *name, struct xattr_ctx *ctx)
}

int do_setxattr(struct mnt_idmap *idmap, struct dentry *dentry,
struct xattr_ctx *ctx)
struct kernel_xattr_ctx *ctx)
{
if (is_posix_acl_xattr(ctx->kname->name))
return do_set_acl(idmap, dentry, ctx->kname->name,
Expand All @@ -635,7 +635,7 @@ static int path_setxattr(const char __user *pathname,
size_t size, int flags, unsigned int lookup_flags)
{
struct xattr_name kname;
struct xattr_ctx ctx = {
struct kernel_xattr_ctx ctx = {
.cvalue = value,
.kvalue = NULL,
.size = size,
Expand Down Expand Up @@ -687,7 +687,7 @@ SYSCALL_DEFINE5(fsetxattr, int, fd, const char __user *, name,
const void __user *,value, size_t, size, int, flags)
{
struct xattr_name kname;
struct xattr_ctx ctx = {
struct kernel_xattr_ctx ctx = {
.cvalue = value,
.kvalue = NULL,
.size = size,
Expand Down Expand Up @@ -720,7 +720,7 @@ SYSCALL_DEFINE5(fsetxattr, int, fd, const char __user *, name,
*/
ssize_t
do_getxattr(struct mnt_idmap *idmap, struct dentry *d,
struct xattr_ctx *ctx)
struct kernel_xattr_ctx *ctx)
{
ssize_t error;
char *kname = ctx->kname->name;
Expand Down Expand Up @@ -755,7 +755,7 @@ getxattr(struct mnt_idmap *idmap, struct dentry *d,
{
ssize_t error;
struct xattr_name kname;
struct xattr_ctx ctx = {
struct kernel_xattr_ctx ctx = {
.value = value,
.kvalue = NULL,
.size = size,
Expand Down
2 changes: 1 addition & 1 deletion io_uring/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

struct io_xattr {
struct file *file;
struct xattr_ctx ctx;
struct kernel_xattr_ctx ctx;
struct filename *filename;
};

Expand Down

0 comments on commit 537c766

Please sign in to comment.