Commit e9b57aaa authored by Jeffle Xu's avatar Jeffle Xu Committed by David Howells
Browse files

fscache: export fscache_end_operation()

parent ad5255c1
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -134,14 +134,6 @@ void cifs_fscache_release_inode_cookie(struct inode *inode)
	}
}

static inline void fscache_end_operation(struct netfs_cache_resources *cres)
{
	const struct netfs_cache_ops *ops = fscache_operation_valid(cres);

	if (ops)
		ops->end_operation(cres);
}

/*
 * Fallback page reading interface.
 */
+0 −11
Original line number Diff line number Diff line
@@ -70,17 +70,6 @@ static inline void fscache_see_cookie(struct fscache_cookie *cookie,
			     where);
}

/*
 * io.c
 */
static inline void fscache_end_operation(struct netfs_cache_resources *cres)
{
	const struct netfs_cache_ops *ops = fscache_operation_valid(cres);

	if (ops)
		ops->end_operation(cres);
}

/*
 * main.c
 */
+0 −8
Original line number Diff line number Diff line
@@ -249,14 +249,6 @@ void nfs_fscache_release_file(struct inode *inode, struct file *filp)
	}
}

static inline void fscache_end_operation(struct netfs_cache_resources *cres)
{
	const struct netfs_cache_ops *ops = fscache_operation_valid(cres);

	if (ops)
		ops->end_operation(cres);
}

/*
 * Fallback page reading interface.
 */
+14 −0
Original line number Diff line number Diff line
@@ -456,6 +456,20 @@ int fscache_begin_read_operation(struct netfs_cache_resources *cres,
	return -ENOBUFS;
}

/**
 * fscache_end_operation - End the read operation for the netfs lib
 * @cres: The cache resources for the read operation
 *
 * Clean up the resources at the end of the read request.
 */
static inline void fscache_end_operation(struct netfs_cache_resources *cres)
{
	const struct netfs_cache_ops *ops = fscache_operation_valid(cres);

	if (ops)
		ops->end_operation(cres);
}

/**
 * fscache_read - Start a read from the cache.
 * @cres: The cache resources to use