diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2025-09-12 11:37:21 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2025-09-16 23:59:38 -0400 |
commit | fe871217ac64a6a26607f74f7f59ab9fa56fd41c (patch) | |
tree | f6dd3c8a96c03d594b64102072c6cd3dfc32afc4 | |
parent | f681e72e2773b9015f1b93cb973f13e4b36d4d24 (diff) |
simplify cifs_atomic_open()
now that finish_no_open() does the right thing if it's given ERR_PTR() as
dentry...
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | fs/smb/client/dir.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/fs/smb/client/dir.c b/fs/smb/client/dir.c index 5223edf6d11a..47710aa13822 100644 --- a/fs/smb/client/dir.c +++ b/fs/smb/client/dir.c @@ -484,8 +484,6 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry, * in network traffic in the other paths. */ if (!(oflags & O_CREAT)) { - struct dentry *res; - /* * Check for hashed negative dentry. We have already revalidated * the dentry and it is fine. No need to perform another lookup. @@ -493,11 +491,7 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry, if (!d_in_lookup(direntry)) return -ENOENT; - res = cifs_lookup(inode, direntry, 0); - if (IS_ERR(res)) - return PTR_ERR(res); - - return finish_no_open(file, res); + return finish_no_open(file, cifs_lookup(inode, direntry, 0)); } xid = get_xid(); |