summaryrefslogtreecommitdiff
path: root/fs/nfs/dir.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2025-12-01 16:25:31 +0100
committerTakashi Iwai <tiwai@suse.de>2025-12-01 16:25:31 +0100
commit72987d2ddc7e4d883d23be87eb858a003b81e2e0 (patch)
tree9d7120886e71d3ec864f8967e3f25c7bcae6bcd9 /fs/nfs/dir.c
parentb72a6ddf6af225957d4b36f858d2a67b2e31fab6 (diff)
parent324f3e03e8a85931ce0880654e3c3eb38b0f0bba (diff)
Merge branch 'for-linus' into for-next
Pull remaining 6.18-devel changes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r--fs/nfs/dir.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 46d9c65d50f8..ea9f6ca8f30f 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -2268,11 +2268,12 @@ int nfs_atomic_open_v23(struct inode *dir, struct dentry *dentry,
return -ENAMETOOLONG;
if (open_flags & O_CREAT) {
- file->f_mode |= FMODE_CREATED;
error = nfs_do_create(dir, dentry, mode, open_flags);
- if (error)
+ if (!error) {
+ file->f_mode |= FMODE_CREATED;
+ return finish_open(file, dentry, NULL);
+ } else if (error != -EEXIST || open_flags & O_EXCL)
return error;
- return finish_open(file, dentry, NULL);
}
if (d_in_lookup(dentry)) {
/* The only flags nfs_lookup considers are