2017-11-01 15:07:57 +01:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
2006-12-08 02:36:31 -08:00
|
|
|
#ifndef _LINUX_FS_STACK_H
|
|
|
|
|
#define _LINUX_FS_STACK_H
|
|
|
|
|
|
|
|
|
|
/* This file defines generic functions used primarily by stackable
|
2025-06-22 23:01:32 -05:00
|
|
|
* filesystems; none of these functions require i_rwsem to be held.
|
2006-12-08 02:36:31 -08:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <linux/fs.h>
|
|
|
|
|
|
|
|
|
|
/* externs for fs/stack.c */
|
2009-12-02 19:51:54 -05:00
|
|
|
extern void fsstack_copy_attr_all(struct inode *dest, const struct inode *src);
|
2009-12-03 21:56:09 -05:00
|
|
|
extern void fsstack_copy_inode_size(struct inode *dst, struct inode *src);
|
2006-12-08 02:36:31 -08:00
|
|
|
|
|
|
|
|
/* inlines */
|
|
|
|
|
static inline void fsstack_copy_attr_atime(struct inode *dest,
|
|
|
|
|
const struct inode *src)
|
|
|
|
|
{
|
2023-10-04 14:53:04 -04:00
|
|
|
inode_set_atime_to_ts(dest, inode_get_atime(src));
|
2006-12-08 02:36:31 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline void fsstack_copy_attr_times(struct inode *dest,
|
|
|
|
|
const struct inode *src)
|
|
|
|
|
{
|
2023-10-04 14:53:04 -04:00
|
|
|
inode_set_atime_to_ts(dest, inode_get_atime(src));
|
|
|
|
|
inode_set_mtime_to_ts(dest, inode_get_mtime(src));
|
2023-07-05 15:01:49 -04:00
|
|
|
inode_set_ctime_to_ts(dest, inode_get_ctime(src));
|
2006-12-08 02:36:31 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif /* _LINUX_FS_STACK_H */
|