vfs_fruit: don't open basefile in ad_open() and simplify API
commit4d7835f64801ee6ac373bd7f1069590b4eee4c3c
authorRalph Boehme <slow@samba.org>
Tue, 23 May 2017 15:31:47 +0000 (23 17:31 +0200)
committerKarolin Seeger <kseeger@samba.org>
Mon, 14 Aug 2017 12:36:21 +0000 (14 14:36 +0200)
tree43d992f70b3bb0d4d943c50c130620cf10d1d350
parentf6089059301d948aa8d6f69801f3e5fd56893b0e
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>
(backported from commit e92a39255e66f655e2758f0a71a01eaf258cf711)
source3/modules/vfs_fruit.c