vfs_streams_xattr: return a fake fd in streams_xattr_open()
authorRalph Boehme <slow@samba.org>
Thu, 11 May 2017 16:08:56 +0000 (18:08 +0200)
committerVolker Lendecke <vl@samba.org>
Wed, 9 Aug 2017 16:41:06 +0000 (18:41 +0200)
commit0a8559d4c9e4fc73c30a06b5f45f3b870afe4439
tree96ecb8a58e5986ff8c9b6d146abdac76e57cf5c5
parent9647af6bec62c9f61d541aad4a9b8f25fd5bc627
vfs_streams_xattr: return a fake fd in streams_xattr_open()

The final step in changing vfs_streams_xattr to not call open() on the
basefile anymore. Instead, we just return a fake file fd based on
dup'ing a pipe fd. Previous commits ensured all calls to VFS API
functions use pathname based versions to do their work.

This ensures we don't trigger kernel oplock breaks for client "open
stream" requests when needlessly opening the basefile.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12791

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/modules/vfs_streams_xattr.c