linux/fs/smb/client/cached_dir.c

// SPDX-License-Identifier: GPL-2.0
/*
 *  Functions to handle the cached directory entries
 *
 *  Copyright (c) 2022, Ronnie Sahlberg <[email protected]>
 */

#include <linux/namei.h>
#include "cifsglob.h"
#include "cifsproto.h"
#include "cifs_debug.h"
#include "smb2proto.h"
#include "cached_dir.h"

static struct cached_fid *init_cached_dir(const char *path);
static void free_cached_dir(struct cached_fid *cfid);
static void smb2_close_cached_fid(struct kref *ref);
static void cfids_laundromat_worker(struct work_struct *work);

static struct cached_fid *find_or_create_cached_dir(struct cached_fids *cfids,
						    const char *path,
						    bool lookup_only,
						    __u32 max_cached_dirs)
{}

static struct dentry *
path_to_dentry(struct cifs_sb_info *cifs_sb, const char *path)
{}

static const char *path_no_prefix(struct cifs_sb_info *cifs_sb,
				  const char *path)
{}

/*
 * Open the and cache a directory handle.
 * If error then *cfid is not initialized.
 */
int open_cached_dir(unsigned int xid, struct cifs_tcon *tcon,
		    const char *path,
		    struct cifs_sb_info *cifs_sb,
		    bool lookup_only, struct cached_fid **ret_cfid)
{}

int open_cached_dir_by_dentry(struct cifs_tcon *tcon,
			      struct dentry *dentry,
			      struct cached_fid **ret_cfid)
{}

static void
smb2_close_cached_fid(struct kref *ref)
{}

void drop_cached_dir_by_name(const unsigned int xid, struct cifs_tcon *tcon,
			     const char *name, struct cifs_sb_info *cifs_sb)
{}


void close_cached_dir(struct cached_fid *cfid)
{}

/*
 * Called from cifs_kill_sb when we unmount a share
 */
void close_all_cached_dirs(struct cifs_sb_info *cifs_sb)
{}

/*
 * Invalidate all cached dirs when a TCON has been reset
 * due to a session loss.
 */
void invalidate_all_cached_dirs(struct cifs_tcon *tcon)
{}

static void
smb2_cached_lease_break(struct work_struct *work)
{}

int cached_dir_lease_break(struct cifs_tcon *tcon, __u8 lease_key[16])
{}

static struct cached_fid *init_cached_dir(const char *path)
{}

static void free_cached_dir(struct cached_fid *cfid)
{}

static void cfids_laundromat_worker(struct work_struct *work)
{}

struct cached_fids *init_cached_dirs(void)
{}

/*
 * Called from tconInfoFree when we are tearing down the tcon.
 * There are no active users or open files/directories at this point.
 */
void free_cached_dirs(struct cached_fids *cfids)
{}