Skip to content

Commit

Permalink
ksmbd: remove unused ksmbd_file_table_flush function
Browse files Browse the repository at this point in the history
ksmbd_file_table_flush is a leftover from SMB1. This function is no longer
needed as SMB1 has been removed from ksmbd.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
  • Loading branch information
Namjae Jeon authored and Steve French committed Sep 4, 2021
1 parent 72d6cbb commit 687c59e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
16 changes: 0 additions & 16 deletions fs/ksmbd/vfs_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -666,22 +666,6 @@ void ksmbd_free_global_file_table(void)
ksmbd_destroy_file_table(&global_ft);
}

int ksmbd_file_table_flush(struct ksmbd_work *work)
{
struct ksmbd_file *fp = NULL;
unsigned int id;
int ret;

read_lock(&work->sess->file_table.lock);
idr_for_each_entry(work->sess->file_table.idr, fp, id) {
ret = ksmbd_vfs_fsync(work, fp->volatile_id, KSMBD_NO_FID);
if (ret)
break;
}
read_unlock(&work->sess->file_table.lock);
return ret;
}

int ksmbd_init_file_table(struct ksmbd_file_table *ft)
{
ft->idr = kzalloc(sizeof(struct idr), GFP_KERNEL);
Expand Down
1 change: 0 additions & 1 deletion fs/ksmbd/vfs_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ void ksmbd_close_session_fds(struct ksmbd_work *work);
int ksmbd_close_inode_fds(struct ksmbd_work *work, struct inode *inode);
int ksmbd_init_global_file_table(void);
void ksmbd_free_global_file_table(void);
int ksmbd_file_table_flush(struct ksmbd_work *work);
void ksmbd_set_fd_limit(unsigned long limit);

/*
Expand Down

0 comments on commit 687c59e

Please sign in to comment.