Skip to content

Commit

Permalink
VFS: Remove SMB_VFS_REMOVEXATTR, no longer used
Browse files Browse the repository at this point in the history
                                       ---------------
                                      /               \
                                     /      REST       \
                                    /        IN         \
                                   /        PEACE        \
                                  /                       \
                                  |                       |
                                  |  SMB_VFS_REMOVEXATTR  |
                                  |                       |
                                  |                       |
                                  |       22 March        |
                                  |         2021          |
                                  |                       |
                                  |                       |
                                 *|     *  *  *           | *
                        _________)/\\_//(\/(/\)/\//\/\////|_)_______

Signed-off-by: Jeremy Allison <[email protected]>
Reviewed-by: Ralph Boehme <[email protected]>
  • Loading branch information
jrasamba authored and slowfranklin committed Apr 7, 2021
1 parent 721c604 commit 38a0618
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 56 deletions.
9 changes: 0 additions & 9 deletions examples/VFS/skel_opaque.c
Original file line number Diff line number Diff line change
Expand Up @@ -933,14 +933,6 @@ static ssize_t skel_flistxattr(vfs_handle_struct *handle,
return -1;
}

static int skel_removexattr(vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
const char *name)
{
errno = ENOSYS;
return -1;
}

static int skel_fremovexattr(vfs_handle_struct *handle,
struct files_struct *fsp, const char *name)
{
Expand Down Expand Up @@ -1120,7 +1112,6 @@ static struct vfs_fn_pointers skel_opaque_fns = {
.getxattrat_recv_fn = skel_getxattrat_recv,
.fgetxattr_fn = skel_fgetxattr,
.flistxattr_fn = skel_flistxattr,
.removexattr_fn = skel_removexattr,
.fremovexattr_fn = skel_fremovexattr,
.fsetxattr_fn = skel_fsetxattr,

Expand Down
8 changes: 0 additions & 8 deletions examples/VFS/skel_transparent.c
Original file line number Diff line number Diff line change
Expand Up @@ -1226,13 +1226,6 @@ static ssize_t skel_flistxattr(vfs_handle_struct *handle,
return SMB_VFS_NEXT_FLISTXATTR(handle, fsp, list, size);
}

static int skel_removexattr(vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
const char *name)
{
return SMB_VFS_NEXT_REMOVEXATTR(handle, smb_fname, name);
}

static int skel_fremovexattr(vfs_handle_struct *handle,
struct files_struct *fsp, const char *name)
{
Expand Down Expand Up @@ -1426,7 +1419,6 @@ static struct vfs_fn_pointers skel_transparent_fns = {
.getxattrat_recv_fn = skel_getxattrat_recv,
.fgetxattr_fn = skel_fgetxattr,
.flistxattr_fn = skel_flistxattr,
.removexattr_fn = skel_removexattr,
.fremovexattr_fn = skel_fremovexattr,
.fsetxattr_fn = skel_fsetxattr,

Expand Down
10 changes: 1 addition & 9 deletions source3/include/vfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@
* Change to Version 45 - will ship with 4.15
* Version 45 - Remove SMB_VFS_LISTXATTR
* Version 45 - Remove SMB_VFS_SETXATTR
* Version 45 - Remove SMB_VFS_REMOVEXATTR
*/

#define SMB_VFS_INTERFACE_VERSION 45
Expand Down Expand Up @@ -1248,9 +1249,6 @@ struct vfs_fn_pointers {
uint8_t **xattr_value);
ssize_t (*fgetxattr_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name, void *value, size_t size);
ssize_t (*flistxattr_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, char *list, size_t size);
int (*removexattr_fn)(struct vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
const char *name);
int (*fremovexattr_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name);
int (*fsetxattr_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name, const void *value, size_t size, int flags);

Expand Down Expand Up @@ -1765,9 +1763,6 @@ ssize_t smb_vfs_call_fgetxattr(struct vfs_handle_struct *handle,
ssize_t smb_vfs_call_flistxattr(struct vfs_handle_struct *handle,
struct files_struct *fsp, char *list,
size_t size);
int smb_vfs_call_removexattr(struct vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
const char *name);
int smb_vfs_call_fremovexattr(struct vfs_handle_struct *handle,
struct files_struct *fsp, const char *name);
int smb_vfs_call_lsetxattr(struct vfs_handle_struct *handle, const char *path,
Expand Down Expand Up @@ -2177,9 +2172,6 @@ ssize_t vfs_not_implemented_listxattr(vfs_handle_struct *handle,
ssize_t vfs_not_implemented_flistxattr(vfs_handle_struct *handle,
struct files_struct *fsp, char *list,
size_t size);
int vfs_not_implemented_removexattr(vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
const char *name);
int vfs_not_implemented_fremovexattr(vfs_handle_struct *handle,
struct files_struct *fsp, const char *name);
int vfs_not_implemented_setxattr(vfs_handle_struct *handle,
Expand Down
5 changes: 0 additions & 5 deletions source3/include/vfs_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -551,11 +551,6 @@
#define SMB_VFS_NEXT_FLISTXATTR(handle,fsp,list,size) \
smb_vfs_call_flistxattr((handle)->next,(fsp),(list),(size))

#define SMB_VFS_REMOVEXATTR(conn,smb_fname,name) \
smb_vfs_call_removexattr((conn)->vfs_handles,(smb_fname),(name))
#define SMB_VFS_NEXT_REMOVEXATTR(handle,smb_fname,name) \
smb_vfs_call_removexattr((handle)->next,(smb_fname),(name))

#define SMB_VFS_FREMOVEXATTR(fsp,name) \
smb_vfs_call_fremovexattr((fsp)->conn->vfs_handles, (fsp), (name))
#define SMB_VFS_NEXT_FREMOVEXATTR(handle,fsp,name) \
Expand Down
8 changes: 0 additions & 8 deletions source3/modules/vfs_default.c
Original file line number Diff line number Diff line change
Expand Up @@ -3636,13 +3636,6 @@ static ssize_t vfswrap_flistxattr(struct vfs_handle_struct *handle, struct files
return listxattr(fsp->fsp_name->base_name, list, size);
}

static int vfswrap_removexattr(struct vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
const char *name)
{
return removexattr(smb_fname->base_name, name);
}

static int vfswrap_fremovexattr(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name)
{
int fd = fsp_get_pathref_fd(fsp);
Expand Down Expand Up @@ -3877,7 +3870,6 @@ static struct vfs_fn_pointers vfs_default_fns = {
.getxattrat_recv_fn = vfswrap_getxattrat_recv,
.fgetxattr_fn = vfswrap_fgetxattr,
.flistxattr_fn = vfswrap_flistxattr,
.removexattr_fn = vfswrap_removexattr,
.fremovexattr_fn = vfswrap_fremovexattr,
.fsetxattr_fn = vfswrap_fsetxattr,

Expand Down
9 changes: 0 additions & 9 deletions source3/modules/vfs_not_implemented.c
Original file line number Diff line number Diff line change
Expand Up @@ -937,14 +937,6 @@ ssize_t vfs_not_implemented_flistxattr(vfs_handle_struct *handle,
return -1;
}

int vfs_not_implemented_removexattr(vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
const char *name)
{
errno = ENOSYS;
return -1;
}

int vfs_not_implemented_fremovexattr(vfs_handle_struct *handle,
struct files_struct *fsp, const char *name)
{
Expand Down Expand Up @@ -1124,7 +1116,6 @@ static struct vfs_fn_pointers vfs_not_implemented_fns = {
.getxattrat_recv_fn = vfs_not_implemented_getxattrat_recv,
.fgetxattr_fn = vfs_not_implemented_fgetxattr,
.flistxattr_fn = vfs_not_implemented_flistxattr,
.removexattr_fn = vfs_not_implemented_removexattr,
.fremovexattr_fn = vfs_not_implemented_fremovexattr,
.fsetxattr_fn = vfs_not_implemented_fsetxattr,

Expand Down
8 changes: 0 additions & 8 deletions source3/smbd/vfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -2925,14 +2925,6 @@ ssize_t smb_vfs_call_flistxattr(struct vfs_handle_struct *handle,
return handle->fns->flistxattr_fn(handle, fsp, list, size);
}

int smb_vfs_call_removexattr(struct vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
const char *name)
{
VFS_FIND(removexattr);
return handle->fns->removexattr_fn(handle, smb_fname, name);
}

int smb_vfs_call_fremovexattr(struct vfs_handle_struct *handle,
struct files_struct *fsp, const char *name)
{
Expand Down

0 comments on commit 38a0618

Please sign in to comment.