Does ceph_fill_inode() mishandle I_NEW?

From: David Howells
Date: Thu Mar 13 2025 - 06:18:10 EST


ceph_fill_inode() seems to be mishandling I_NEW. It only check I_NEW when
setting i_mode. It then goes on to clobber a bunch of things in the inode
struct and ceph_inode_info struct (granted in some cases it's overwriting with
the same thing), irrespective of whether the inode is already set up
(i.e. if I_NEW isn't set).

It looks like I_NEW has been interpreted as to indicating that the inode is
being created as a filesystem object (e.g. by mkdir) whereas it's actually
merely about allocation and initialisation of struct inode in memory.

David