Skip to content
Commit 62b2ce96 authored by Sage Weil's avatar Sage Weil Committed by Miklos Szeredi
Browse files

vfs: fix propagation of atomic_open create error on negative dentry



If ->atomic_open() returns -ENOENT, we take care to return the create
error (e.g., EACCES), if any.  Do the same when ->atomic_open() returns 1
and provides a negative dentry.

This fixes a regression where an unprivileged open O_CREAT fails with
ENOENT instead of EACCES, introduced with the new atomic_open code.  It
is tested by the open/08.t test in the pjd posix test suite, and was
observed on top of fuse (backed by ceph-fuse).

Signed-off-by: default avatarSage Weil <sage@inktank.com>
Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
parent af109bca
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