Skip to content

Commit d6cd7ce

Browse files
fs/ntfs3: Fix ntfs_atomic_open
This fixes xfstest 633/696. Signed-off-by: Konstantin Komarov <[email protected]>
1 parent 14f527d commit d6cd7ce

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

fs/ntfs3/namei.c

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -422,19 +422,10 @@ static int ntfs_atomic_open(struct inode *dir, struct dentry *dentry,
422422
* fnd contains tree's path to insert to.
423423
* If fnd is not NULL then dir is locked.
424424
*/
425-
426-
/*
427-
* Unfortunately I don't know how to get here correct 'struct nameidata *nd'
428-
* or 'struct mnt_idmap *idmap'.
429-
* See atomic_open in fs/namei.c.
430-
* This is why xfstest/633 failed.
431-
* Looks like ntfs_atomic_open must accept 'struct mnt_idmap *idmap' as argument.
432-
*/
433-
434-
inode = ntfs_create_inode(&nop_mnt_idmap, dir, dentry, uni, mode, 0,
435-
NULL, 0, fnd);
425+
inode = ntfs_create_inode(mnt_idmap(file->f_path.mnt), dir, dentry, uni,
426+
mode, 0, NULL, 0, fnd);
436427
err = IS_ERR(inode) ? PTR_ERR(inode) :
437-
finish_open(file, dentry, ntfs_file_open);
428+
finish_open(file, dentry, ntfs_file_open);
438429
dput(d);
439430

440431
out2:

0 commit comments

Comments
 (0)