Commit 1f24cd31 authored by Al Viro's avatar Al Viro

nfs_finish_open(): don't open-code file_inode()

Reviewed-by: default avatarChristian Brauner (Microsoft) <brauner@kernel.org>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent e6ae4381
...@@ -2022,7 +2022,7 @@ static int nfs_finish_open(struct nfs_open_context *ctx, ...@@ -2022,7 +2022,7 @@ static int nfs_finish_open(struct nfs_open_context *ctx,
err = finish_open(file, dentry, do_open); err = finish_open(file, dentry, do_open);
if (err) if (err)
goto out; goto out;
if (S_ISREG(file->f_path.dentry->d_inode->i_mode)) if (S_ISREG(file_inode(file)->i_mode))
nfs_file_set_open_context(file, ctx); nfs_file_set_open_context(file, ctx);
else else
err = -EOPENSTALE; err = -EOPENSTALE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment