blob: 54210a42c30d1629411ac5b50a23080686e38e21 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Josef "Jeff" Sipek42cf1192006-12-08 02:36:31 -08002#ifndef _LINUX_FS_STACK_H
3#define _LINUX_FS_STACK_H
4
5/* This file defines generic functions used primarily by stackable
6 * filesystems; none of these functions require i_mutex to be held.
7 */
8
9#include <linux/fs.h>
10
11/* externs for fs/stack.c */
Erez Zadok9afa2fb2009-12-02 19:51:54 -050012extern void fsstack_copy_attr_all(struct inode *dest, const struct inode *src);
Erez Zadok1b8ab812009-12-03 21:56:09 -050013extern void fsstack_copy_inode_size(struct inode *dst, struct inode *src);
Josef "Jeff" Sipek42cf1192006-12-08 02:36:31 -080014
15/* inlines */
16static inline void fsstack_copy_attr_atime(struct inode *dest,
17 const struct inode *src)
18{
19 dest->i_atime = src->i_atime;
20}
21
22static inline void fsstack_copy_attr_times(struct inode *dest,
23 const struct inode *src)
24{
25 dest->i_atime = src->i_atime;
26 dest->i_mtime = src->i_mtime;
27 dest->i_ctime = src->i_ctime;
28}
29
30#endif /* _LINUX_FS_STACK_H */