On Thu, May 01, 2014 at 09:38:07AM -0400, Brian Foster wrote: > The current tmpfile handler does not initialize default ACLs. Doing so > within xfs_vn_tmpfile() makes it roughly equivalent to xfs_vn_mknod(), > which is already used as a common create handler. > > xfs_vn_mknod() does not currently have a mechanism to determine whether > to link the file into the namespace. Therefore, further abstract > xfs_vn_mknod() into a new xfs_generic_create() handler with a tmpfile > parameter. This new handler passes a NULL xname to the create and calls > d_tmpfile() on the dentry when called via ->tmpfile(). > > Signed-off-by: Brian Foster <bfoster@xxxxxxxxxx> > --- > > Hi all, > > It appears that we want to initialize default ACLs for ->tmpfile() after > all. This patch reintroduces the refactoring to initialize security and > ACLs through the current xfs_vn_mknod(). This is based on top of the > previously posted series: > > http://oss.sgi.com/archives/xfs/2014-04/msg00396.html > > Brian ..... > @@ -1053,25 +1074,7 @@ xfs_vn_tmpfile( > struct dentry *dentry, > umode_t mode) > { > - int error; > - struct xfs_inode *ip; > - struct inode *inode; > - > - error = xfs_create(XFS_I(dir), NULL, mode, 0, &ip); > - if (unlikely(error)) > - return -error; > - > - inode = VFS_I(ip); > - > - error = xfs_init_security(inode, dir, &dentry->d_name); > - if (unlikely(error)) { > - iput(inode); > - return -error; > - } > - > - d_tmpfile(dentry, inode); > - > - return 0; > + return xfs_generic_create(dir, dentry, mode, 0, true); > } This hunk doesn't apply to a 3.15-rc2 kernel - it calls xfs_create_tmpfile(). Just applying it as is after fixing the hunk causes a crash in xfs-create(), because the code in the patch is calling xfs-create ratehr than xfs_create_tmpfile(). Brian, can you regenerate this patch against a current linus tree (3.15-rc4)? Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx _______________________________________________ xfs mailing list xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs