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