Re: [PATCH v3 1/3] fs: fuse: add const qualifier to fuse_ctl_file_conn_get()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 9, 2025 at 8:34 AM Chen Linxuan via B4 Relay
<devnull+chenlinxuan.uniontech.com@xxxxxxxxxx> wrote:
>
> From: Chen Linxuan <chenlinxuan@xxxxxxxxxxxxx>
>
> Add const qualifier to the file parameter in fuse_ctl_file_conn_get
> function to indicate that this function does not modify the passed file
> object. This improves code clarity and type safety by making the API
> contract more explicit.
>
> Signed-off-by: Chen Linxuan <chenlinxuan@xxxxxxxxxxxxx>

Feel free to add:
Reviewed-by: Amir Goldstein <amir73il@xxxxxxxxx>

> ---
>  fs/fuse/control.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/fuse/control.c b/fs/fuse/control.c
> index 2a730d88cc3bdb50ea1f8a3185faad5f05fc6e74..f0874403b1f7c91571f38e4ae9f8cebe259f7dd1 100644
> --- a/fs/fuse/control.c
> +++ b/fs/fuse/control.c
> @@ -20,7 +20,7 @@
>   */
>  static struct super_block *fuse_control_sb;
>
> -static struct fuse_conn *fuse_ctl_file_conn_get(struct file *file)
> +static struct fuse_conn *fuse_ctl_file_conn_get(const struct file *file)
>  {
>         struct fuse_conn *fc;
>         mutex_lock(&fuse_mutex);
>
> --
> 2.43.0
>
>





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux