On Thu, Aug 29, 2019 at 09:21:15PM -0700, Darrick J. Wong wrote: > From: Darrick J. Wong <darrick.wong@xxxxxxxxxx> > > Create a helper to open a file and initialize the xfd structure. > > Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx> .... > > +/* Open a file on an XFS filesystem. Returns zero or a positive error code. */ > +int > +xfd_open( > + struct xfs_fd *xfd, > + const char *pathname, > + int flags) > +{ > + int ret; > + > + xfd->fd = open(pathname, O_RDONLY); open(pathname, flags) And, to handle all future uses, shouldn't it also pass a mode? Though I think that can be done as a separate patch when we need O_RDWR for open.... Otherwise it looks ok. Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx