public inbox for ntfs3@lists.linux.dev
 help / color / mirror / Atom feed
From: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
To: <ntfs3@lists.linux.dev>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	<linux-fsdevel@vger.kernel.org>
Subject: [PATCH 02/10] fs/ntfs3: Fix ntfs_atomic_open
Date: Mon, 8 May 2023 16:36:36 +0400	[thread overview]
Message-ID: <cf807cd5-8566-6a56-f446-1f97ffd9eacc@paragon-software.com> (raw)
In-Reply-To: <b21a4bc9-166d-2631-d73b-cb4e802ff69e@paragon-software.com>

This fixes xfstest 633/696.

Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
---
  fs/ntfs3/namei.c | 15 +++------------
  1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/fs/ntfs3/namei.c b/fs/ntfs3/namei.c
index 9736b1e4a0f6..343bce6da58a 100644
--- a/fs/ntfs3/namei.c
+++ b/fs/ntfs3/namei.c
@@ -422,19 +422,10 @@ 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);
+                  finish_open(file, dentry, ntfs_file_open);
      dput(d);

  out2:
-- 
2.34.1


  parent reply	other threads:[~2023-05-08 12:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-08 12:35 [PATCH 00/10] Refactoring and bugfix Konstantin Komarov
2023-05-08 12:36 ` [PATCH 01/10] fs/ntfs3: Correct checking while generating attr_list Konstantin Komarov
2023-05-08 12:36 ` Konstantin Komarov [this message]
2023-05-08 12:36 ` [PATCH 03/10] fs/ntfs3: Mark ntfs dirty when on-disk struct is corrupted Konstantin Komarov
2023-05-08 12:37 ` [PATCH 04/10] fs/ntfs3: Alternative boot if primary boot " Konstantin Komarov
2023-05-08 12:38 ` [PATCH 05/10] fs/ntfs3: Do not update primary boot in ntfs_init_from_boot() Konstantin Komarov
2023-05-08 12:38 ` [PATCH 06/10] fs/ntfs3: Code formatting Konstantin Komarov
2023-05-08 12:38 ` [PATCH 07/10] fs/ntfs3: Code refactoring Konstantin Komarov
2023-05-08 12:39 ` [PATCH 08/10] fs/ntfs3: Add ability to format new mft records with bigger/smaller header Konstantin Komarov
2023-05-08 12:39 ` [PATCH 09/10] fs/ntfs3: Fix endian problem Konstantin Komarov
2023-05-08 12:40 ` [PATCH 10/10] fs/ntfs3: Add support /proc/fs/ntfs3/<dev>/volinfo and /proc/fs/ntfs3/<dev>/label Konstantin Komarov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cf807cd5-8566-6a56-f446-1f97ffd9eacc@paragon-software.com \
    --to=almaz.alexandrovich@paragon-software.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ntfs3@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox