Re: [PATCH] fs/proc: Use inode_get_dev() for device numbers in procmap_query

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

 



On Wed, Jul 16, 2025 at 10:27:32AM -0400, Wei Gao wrote:
> This ensures consistency and proper abstraction when accessing device
> information associated with an inode.
> 
> Signed-off-by: Wei Gao <wegao@xxxxxxxx>
> ---
>  fs/proc/task_mmu.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
> index 751479eb128f..b113a274f814 100644
> --- a/fs/proc/task_mmu.c
> +++ b/fs/proc/task_mmu.c
> @@ -518,8 +518,8 @@ static int do_procmap_query(struct proc_maps_private *priv, void __user *uarg)
>  		const struct inode *inode = file_user_inode(vma->vm_file);
>  
>  		karg.vma_offset = ((__u64)vma->vm_pgoff) << PAGE_SHIFT;
> -		karg.dev_major = MAJOR(inode->i_sb->s_dev);
> -		karg.dev_minor = MINOR(inode->i_sb->s_dev);
> +		karg.dev_major = MAJOR(inode_get_dev(inode));
> +		karg.dev_minor = MINOR(inode_get_dev(inode));
>  		karg.inode = inode->i_ino;
>  	} else {
>  		karg.vma_offset = 0;
> -- 
> 2.49.0
> 

Sorry for my mistake, this patch is not correct since upstream has no inode_get_dev function,
Only suse downstream code defines this function. Please SKIP this patch.




[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