From: Andrew Morton <akpm@linux-foundation•org>
To: Stephen Rothwell <sfr@canb•auug.org.au>
Cc: "Theodore Ts'o" <tytso@mit•edu>,
Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
Linux Next Mailing List <linux-next@vger•kernel.org>
Subject: Re: linux-next: build warning after merge of the mm tree
Date: Mon, 18 Jul 2022 15:54:12 -0700 [thread overview]
Message-ID: <20220718155412.fe6a624ec067ef603bbf0cd8@linux-foundation.org> (raw)
In-Reply-To: <20220718202815.11807e92@canb.auug.org.au>
On Mon, 18 Jul 2022 20:28:15 +1000 Stephen Rothwell <sfr@canb•auug.org.au> wrote:
> After merging the mm tree, today's linux-next build (powerpc
> ppc44x_defconfig) produced this warning:
>
> mm/shmem.c:2848:12: warning: 'shmem_fileattr_set' defined but not used [-Wunused-function]
> 2848 | static int shmem_fileattr_set(struct user_namespace *mnt_userns,
> | ^~~~~~~~~~~~~~~~~~
> mm/shmem.c:2839:12: warning: 'shmem_fileattr_get' defined but not used [-Wunused-function]
> 2839 | static int shmem_fileattr_get(struct dentry *dentry, struct fileattr *fa)
> | ^~~~~~~~~~~~~~~~~~
>
> Introduced by commit
>
> 8673852551f0 ("mm/shmem: support FS_IOC_[SG]ETFLAGS in tmpfs")
Thanks, I moved the definitions inside the appropriate ifdef.
--- a/mm/shmem.c~mm-shmem-support-fs_ioc_etflags-in-tmpfs-fix
+++ a/mm/shmem.c
@@ -2837,39 +2837,6 @@ out:
return error;
}
-static int shmem_fileattr_get(struct dentry *dentry, struct fileattr *fa)
-{
- struct shmem_inode_info *info = SHMEM_I(d_inode(dentry));
-
- fileattr_fill_flags(fa, info->fsflags & SHMEM_FL_USER_VISIBLE);
-
- return 0;
-}
-
-static int shmem_fileattr_set(struct user_namespace *mnt_userns,
- struct dentry *dentry, struct fileattr *fa)
-{
- struct inode *inode = d_inode(dentry);
- struct shmem_inode_info *info = SHMEM_I(inode);
-
- if (fileattr_has_fsx(fa))
- return -EOPNOTSUPP;
-
- info->fsflags = (info->fsflags & ~SHMEM_FL_USER_MODIFIABLE) |
- (fa->flags & SHMEM_FL_USER_MODIFIABLE);
-
- inode->i_flags &= ~(S_APPEND | S_IMMUTABLE | S_NOATIME);
- if (info->fsflags & FS_APPEND_FL)
- inode->i_flags |= S_APPEND;
- if (info->fsflags & FS_IMMUTABLE_FL)
- inode->i_flags |= S_IMMUTABLE;
- if (info->fsflags & FS_NOATIME_FL)
- inode->i_flags |= S_NOATIME;
-
- inode->i_ctime = current_time(inode);
- return 0;
-}
-
static int shmem_statfs(struct dentry *dentry, struct kstatfs *buf)
{
struct shmem_sb_info *sbinfo = SHMEM_SB(dentry->d_sb);
@@ -3195,6 +3162,40 @@ static const char *shmem_get_link(struct
}
#ifdef CONFIG_TMPFS_XATTR
+
+static int shmem_fileattr_get(struct dentry *dentry, struct fileattr *fa)
+{
+ struct shmem_inode_info *info = SHMEM_I(d_inode(dentry));
+
+ fileattr_fill_flags(fa, info->fsflags & SHMEM_FL_USER_VISIBLE);
+
+ return 0;
+}
+
+static int shmem_fileattr_set(struct user_namespace *mnt_userns,
+ struct dentry *dentry, struct fileattr *fa)
+{
+ struct inode *inode = d_inode(dentry);
+ struct shmem_inode_info *info = SHMEM_I(inode);
+
+ if (fileattr_has_fsx(fa))
+ return -EOPNOTSUPP;
+
+ info->fsflags = (info->fsflags & ~SHMEM_FL_USER_MODIFIABLE) |
+ (fa->flags & SHMEM_FL_USER_MODIFIABLE);
+
+ inode->i_flags &= ~(S_APPEND | S_IMMUTABLE | S_NOATIME);
+ if (info->fsflags & FS_APPEND_FL)
+ inode->i_flags |= S_APPEND;
+ if (info->fsflags & FS_IMMUTABLE_FL)
+ inode->i_flags |= S_IMMUTABLE;
+ if (info->fsflags & FS_NOATIME_FL)
+ inode->i_flags |= S_NOATIME;
+
+ inode->i_ctime = current_time(inode);
+ return 0;
+}
+
/*
* Superblocks without xattr inode operations may get some security.* xattr
* support from the LSM "for free". As soon as we have any other xattrs
_
next prev parent reply other threads:[~2022-07-18 22:54 UTC|newest]
Thread overview: 93+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-18 10:28 linux-next: build warning after merge of the mm tree Stephen Rothwell
2022-07-18 22:54 ` Andrew Morton [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-04-04 2:14 Stephen Rothwell
2025-04-05 6:30 ` Zhiquan Li
2025-03-28 6:46 Stephen Rothwell
2025-03-28 15:08 ` Kent Overstreet
2025-03-05 9:33 Stephen Rothwell
2025-03-05 18:28 ` SeongJae Park
2025-02-18 23:46 Stephen Rothwell
2025-02-14 9:57 Stephen Rothwell
2025-02-10 3:51 Stephen Rothwell
2025-01-09 4:27 Stephen Rothwell
2025-01-06 6:37 Stephen Rothwell
2025-01-06 18:39 ` SeongJae Park
2024-10-17 8:43 Stephen Rothwell
2024-10-17 16:53 ` Sabyrzhan Tasbolatov
2024-10-17 21:16 ` Andrew Morton
2024-09-03 5:37 Stephen Rothwell
2024-09-03 6:35 ` Sergey Senozhatsky
2024-09-02 6:30 Stephen Rothwell
2024-08-12 3:30 Stephen Rothwell
2024-08-12 4:40 ` Saurabh Singh Sengar
2024-08-12 3:24 Stephen Rothwell
2024-06-06 3:23 Stephen Rothwell
2024-06-06 5:01 ` Baolin Wang
2024-06-11 21:58 ` Andrew Morton
2024-06-12 0:47 ` Baolin Wang
2024-06-06 3:19 Stephen Rothwell
2024-06-06 3:36 ` Kefeng Wang
2024-05-07 6:26 Stephen Rothwell
2024-04-17 5:18 Stephen Rothwell
2024-04-17 15:57 ` Matthew Wilcox
2024-04-15 5:20 Stephen Rothwell
2024-04-15 5:45 ` Barry Song
2024-03-27 22:13 Stephen Rothwell
2024-03-28 1:59 ` Baoquan He
2024-03-28 4:29 ` Stephen Rothwell
2024-03-25 1:25 Stephen Rothwell
2024-03-26 2:21 ` Suren Baghdasaryan
2024-03-25 1:22 Stephen Rothwell
2024-03-25 8:56 ` David Hildenbrand
2024-03-13 4:07 Stephen Rothwell
2024-03-13 9:00 ` Uwe Kleine-König
2024-03-13 15:22 ` Masahiro Yamada
2024-03-13 21:11 ` Uwe Kleine-König
2024-01-02 5:40 Stephen Rothwell
2024-01-02 12:54 ` Kirill A. Shutemov
2023-12-04 4:54 Stephen Rothwell
2023-12-04 17:03 ` SeongJae Park
2023-11-28 2:33 Stephen Rothwell
2023-10-04 4:46 Stephen Rothwell
2023-09-25 23:27 Stephen Rothwell
2023-09-18 3:18 Stephen Rothwell
2023-09-12 5:20 Stephen Rothwell
2023-06-05 3:10 Stephen Rothwell
2023-06-05 14:57 ` Liam R. Howlett
2023-05-15 23:25 Stephen Rothwell
2023-05-08 1:19 Stephen Rothwell
2023-05-08 21:36 ` Nhat Pham
2023-03-20 3:47 Stephen Rothwell
2023-03-23 2:58 ` Stephen Rothwell
2023-03-23 19:38 ` Andrew Morton
2023-03-16 1:12 Stephen Rothwell
2023-03-01 0:36 Stephen Rothwell
2023-03-01 0:47 ` Suren Baghdasaryan
2023-03-01 2:29 ` Suren Baghdasaryan
2023-03-01 5:45 ` Stephen Rothwell
2023-01-17 3:51 Stephen Rothwell
2022-12-17 19:22 Stephen Rothwell
2022-11-10 7:36 Stephen Rothwell
2022-11-10 7:33 Stephen Rothwell
2022-11-10 16:27 ` Linus Torvalds
2022-11-10 20:20 ` Randy Dunlap
2022-11-10 20:43 ` Jonathan Corbet
2022-10-26 0:57 Stephen Rothwell
2022-10-26 1:13 ` Sergey Senozhatsky
2022-09-19 9:09 Stephen Rothwell
2022-09-19 9:30 ` Miaohe Lin
2022-07-21 9:55 Stephen Rothwell
2022-07-21 11:11 ` Zach O'Keefe
2022-06-22 5:54 Stephen Rothwell
2022-06-22 7:11 ` Stephen Rothwell
2022-06-22 16:39 ` Mike Kravetz
2022-06-22 18:49 ` Andrew Morton
2022-05-25 5:54 Stephen Rothwell
2022-05-25 10:57 ` Zi Yan
2022-05-25 17:36 ` Andrew Morton
2022-05-12 9:46 Stephen Rothwell
2022-05-12 12:23 ` Johannes Weiner
2022-05-05 21:35 Stephen Rothwell
2022-05-05 21:38 ` Stephen Rothwell
2022-05-05 22:18 ` Matthew Wilcox
2022-04-28 7:44 Stephen Rothwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220718155412.fe6a624ec067ef603bbf0cd8@linux-foundation.org \
--to=akpm@linux-foundation$(echo .)org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=sfr@canb$(echo .)auug.org.au \
--cc=tytso@mit$(echo .)edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox