diff mbox series

NFSv4.2: alloc_file_pseudo() takes an open flag, not an f_mode

Message ID 20211105183816.328639-2-trondmy@kernel.org (mailing list archive)
State New, archived
Headers show
Series NFSv4.2: alloc_file_pseudo() takes an open flag, not an f_mode | expand

Commit Message

Trond Myklebust Nov. 5, 2021, 6:38 p.m. UTC
From: Trond Myklebust <trond.myklebust@hammerspace.com>

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
---
 fs/nfs/nfs4file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/fs/nfs/nfs4file.c b/fs/nfs/nfs4file.c
index f9f50fe1f3a4..208dcae68f58 100644
--- a/fs/nfs/nfs4file.c
+++ b/fs/nfs/nfs4file.c
@@ -351,7 +351,7 @@  static struct file *__nfs42_ssc_open(struct vfsmount *ss_mnt,
 		goto out_free_name;
 	}
 
-	filep = alloc_file_pseudo(r_ino, ss_mnt, read_name, FMODE_READ,
+	filep = alloc_file_pseudo(r_ino, ss_mnt, read_name, O_RDONLY,
 				     r_ino->i_fop);
 	if (IS_ERR(filep)) {
 		res = ERR_CAST(filep);