vfs_fruit: don't open basefile in ad_open() and simplify API
authorRalph Boehme <slow@samba.org>
Tue, 23 May 2017 15:31:47 +0000 (17:31 +0200)
committerVolker Lendecke <vl@samba.org>
Wed, 9 Aug 2017 16:41:06 +0000 (18:41 +0200)
commite92a39255e66f655e2758f0a71a01eaf258cf711
tree3d22632291f3a27b9846ac9cda899e77bbd8599b
parentaff6fc49f4ac244aef162200a37bd846719e1e4f
vfs_fruit: don't open basefile in ad_open() and simplify API

We never need an fd on the basefile when operating on the metadata, as
we can always use path based syscalls. Opening the basefile conflicts
with "kernel oplocks" so just don't do it.

Additional changes:

- remove the adouble_type_t argument to ad_open(), the type is passed
  and set when allocating a struct adouble with ad_alloc()

- additionally pass an optional fsp to ad_open() (so the caller can pass
  NULL). With this change we can move the fd inheritance from fsp to ad
  into ad_open() itself where it belongs and remove it from the caller
  ad_fget()

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>
source3/modules/vfs_fruit.c