Unverified Commit d6cd7cec authored by Konstantin Komarov's avatar Konstantin Komarov
Browse files

fs/ntfs3: Fix ntfs_atomic_open



This fixes xfstest 633/696.

Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
parent 14f527d4
Loading
Loading
Loading
Loading
+3 −12
Original line number Diff line number Diff line
@@ -422,17 +422,8 @@ static int ntfs_atomic_open(struct inode *dir, struct dentry *dentry,
	 * fnd contains tree's path to insert to.
	 * If fnd is not NULL then dir is locked.
	 */

	/*
	 * Unfortunately I don't know how to get here correct 'struct nameidata *nd'
	 * or 'struct mnt_idmap *idmap'.
	 * See atomic_open in fs/namei.c.
	 * This is why xfstest/633 failed.
	 * Looks like ntfs_atomic_open must accept 'struct mnt_idmap *idmap' as argument.
	 */

	inode = ntfs_create_inode(&nop_mnt_idmap, dir, dentry, uni, mode, 0,
				  NULL, 0, fnd);
	inode = ntfs_create_inode(mnt_idmap(file->f_path.mnt), dir, dentry, uni,
				  mode, 0, NULL, 0, fnd);
	err = IS_ERR(inode) ? PTR_ERR(inode) :
			      finish_open(file, dentry, ntfs_file_open);
	dput(d);