Skip to content

Commit aa97a3e

Browse files
author
Trond Myklebust
committed
NFSv4.2: alloc_file_pseudo() takes an open flag, not an f_mode
Signed-off-by: Trond Myklebust <[email protected]>
1 parent 156cd28 commit aa97a3e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fs/nfs/nfs4file.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,13 +351,12 @@ static struct file *__nfs42_ssc_open(struct vfsmount *ss_mnt,
351351
goto out_free_name;
352352
}
353353

354-
filep = alloc_file_pseudo(r_ino, ss_mnt, read_name, FMODE_READ,
354+
filep = alloc_file_pseudo(r_ino, ss_mnt, read_name, O_RDONLY,
355355
r_ino->i_fop);
356356
if (IS_ERR(filep)) {
357357
res = ERR_CAST(filep);
358358
goto out_free_name;
359359
}
360-
filep->f_mode |= FMODE_READ;
361360

362361
ctx = alloc_nfs_open_context(filep->f_path.dentry, filep->f_mode,
363362
filep);

0 commit comments

Comments
 (0)