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

TAKE - set inode ops in xfs_attrctl_by_handle



Apparently it's possible to get a fresh inode via xfs_attrctl_by_handle,
that has no inode->i_op->attrctl set.  This would cause xfsdump to
segfault (to try this, attrctl a device file, unmount & remount the 
filesystem, then xfsdump this filesystem - thanks to Harrison
Xing).

I've added linvfs_set_inode_ops and linvfs_revalidate_core calls
on the inode in xfs_attrctl_by_handle to avoid this.

Note that this may set the ops twice in some cases, though, since
for example xfsdump calls xfs_open_by_handle on regular files
before xfs_attrctl_by_handle, and the inode ops get set in both
places.  I don't think this is the end of the world, though, and
it's certainly better than never setting it.  :)

Date:  Fri Aug 10 13:49:41 PDT 2001
Workarea:  stout.americas.sgi.com:/localhome/eric/2.4.x-xfs/workarea

The following file(s) were checked into:
  bonnie.engr.sgi.com:/isms/slinx/2.4.x-xfs


Modid:  2.4.x-xfs:slinx:100561a
linux/fs/xfs/linux/xfs_ioctl.c - 1.45
	- set inode ops in xfs_attrctl_by_handle