]> git.ipfire.org Git - thirdparty/samba.git/commit
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)
committerKarolin Seeger <kseeger@samba.org>
Mon, 14 Aug 2017 08:50:10 +0000 (10:50 +0200)
commit379dbb5fe8c05d6bea0d332e0395bb07c0c5b07a
tree911e38c0e61985d13f678b69f2b4aa879b6e47eb
parentd6c991628ba68341acc84540a3f8a15e0336e00b
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