From: Jeremy Allison Date: Fri, 4 Oct 2019 20:53:13 +0000 (-0700) Subject: s3: VFS: vfs_xattr_tdb: Remove rmdir_fn. No longer used. X-Git-Tag: talloc-2.3.1~415 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=305f2b8d01c5e9ecaa599372f75656169e777c7f;p=thirdparty%2Fsamba.git s3: VFS: vfs_xattr_tdb: Remove rmdir_fn. No longer used. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/modules/vfs_xattr_tdb.c b/source3/modules/vfs_xattr_tdb.c index 1d97770e0b6..c87be90f940 100644 --- a/source3/modules/vfs_xattr_tdb.c +++ b/source3/modules/vfs_xattr_tdb.c @@ -659,46 +659,6 @@ static int xattr_tdb_unlinkat(vfs_handle_struct *handle, return ret; } -/* - * On rmdir we need to delete the tdb record - */ -static int xattr_tdb_rmdir(vfs_handle_struct *handle, - const struct smb_filename *smb_fname) -{ - SMB_STRUCT_STAT sbuf; - struct file_id id; - struct db_context *db; - int ret; - TALLOC_CTX *frame = talloc_stackframe(); - - SMB_VFS_HANDLE_GET_DATA(handle, db, struct db_context, - if (!xattr_tdb_init(-1, frame, &db)) - { - TALLOC_FREE(frame); return -1; - }); - - if (vfs_stat_smb_basename(handle->conn, - smb_fname, - &sbuf) == -1) { - TALLOC_FREE(frame); - return -1; - } - - ret = SMB_VFS_NEXT_RMDIR(handle, smb_fname); - - if (ret == -1) { - TALLOC_FREE(frame); - return -1; - } - - id = SMB_VFS_NEXT_FILE_ID_CREATE(handle, &sbuf); - - xattr_tdb_remove_all_attrs(db, &id); - - TALLOC_FREE(frame); - return 0; -} - /* * Destructor for the VFS private data */ @@ -757,7 +717,6 @@ static struct vfs_fn_pointers vfs_xattr_tdb_fns = { .open_fn = xattr_tdb_open, .mkdirat_fn = xattr_tdb_mkdirat, .unlinkat_fn = xattr_tdb_unlinkat, - .rmdir_fn = xattr_tdb_rmdir, .connect_fn = xattr_tdb_connect, };