s3-vfs: Fix stream_depot vfs module on btrfs.
commit51241bb3cb8941c5125c5c84f36932f006242b88
authorAndreas Schneider <asn@samba.org>
Fri, 8 Nov 2013 14:41:18 +0000 (8 15:41 +0100)
committerKarolin Seeger <kseeger@samba.org>
Mon, 10 Mar 2014 15:36:54 +0000 (10 16:36 +0100)
treee6c55d089b626053a1586f5781f7fd69e7349776
parent70455f0382430fed1d73597a0010d03212524597
s3-vfs: Fix stream_depot vfs module on btrfs.

Checking if the directory is empty using 'nlink == 2' only checks if
there are no subdirectories. It doesn't indicate if there are files in
the directory. However checking link count for no subdirectories is
wrong and applications shouldn't rely on it, see:

https://lkml.org/lkml/2012/2/1/756

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
(cherry picked from commit 654b784e9c9c3563afd1af853f4795117c258e56)
source3/modules/vfs_streams_depot.c