Re: [PATCH V2 2/6] shmem: make shmem_get_inode() return ERR_PTR instead of NULL

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

 



On Thu, Apr 20, 2023 at 03:25:16PM +0200, Jan Kara wrote:
> On Thu 20-04-23 10:03:55, cem@xxxxxxxxxx wrote:
> > From: Lukas Czerner <lczerner@xxxxxxxxxx>
> >
> > Make shmem_get_inode() return ERR_PTR instead of NULL on error. This will be
> > useful later when we introduce quota support.
> >
> > There should be no functional change.
> >
> > Signed-off-by: Lukas Czerner <lczerner@xxxxxxxxxx>
> > Signed-off-by: Carlos Maiolino <cmaiolino@xxxxxxxxxx>
> 
> Looks good to me except for one problem with ramfs fallback:
> 
> > @@ -4209,10 +4228,16 @@ EXPORT_SYMBOL_GPL(shmem_truncate_range);
> >  #define shmem_vm_ops				generic_file_vm_ops
> >  #define shmem_anon_vm_ops			generic_file_vm_ops
> >  #define shmem_file_operations			ramfs_file_operations
> > -#define shmem_get_inode(idmap, sb, dir, mode, dev, flags) ramfs_get_inode(sb, dir, mode, dev)
> >  #define shmem_acct_size(flags, size)		0
> >  #define shmem_unacct_size(flags, size)		do {} while (0)
> >
> > +static inline struct inode *shmem_get_inode(struct mnt_idmap, struct super_block *sb, struct inode *dir,
> > +					    umode_t mode, dev_t dev, unsigned long flags)
> 
> IMO this won't even compile - "struct mnt_idmap," does not look like valid
> C.

True, I totally overlooked at it as I've been testing with/without TMPFS_QUOTA
and QUOTA, I totally forgot to disable CONFIG_SHMEM for testing.
I'll update it on a next version once we get a few eyes on it.

Thanks for spotting it Honza!

> 
> 								Honza
> --
> Jan Kara <jack@xxxxxxxx>
> SUSE Labs, CR

-- 
Carlos Maiolino



[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