2
* Copyright (C) 2005, 2006, 2007 Junjiro Okajima
4
* This program, aufs is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; either version 2 of the License, or
7
* (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19
/* $Id: whout.h,v 1.7 2007/04/09 02:46:28 sfjro Exp $ */
21
#ifndef __AUFS_WHOUT_H__
22
#define __AUFS_WHOUT_H__
25
#include <linux/aufs_type.h>
29
int au_alloc_whname(const char *name, int len, struct qstr *wh);
30
void au_free_whname(struct qstr *wh);
33
int is_wh(struct dentry *h_parent, struct qstr *wh_name, int try_sio,
34
struct lkup_args *lkup);
35
int is_diropq(struct dentry *h_dentry, struct lkup_args *lkup);
37
struct dentry *lkup_whtmp(struct dentry *h_parent, struct qstr *prefix,
38
struct lkup_args *lkup);
39
int rename_whtmp(struct dentry *dentry, aufs_bindex_t bindex);
40
int au_unlink_wh_dentry(struct inode *h_dir, struct dentry *wh_dentry,
41
struct dentry *dentry, int dlgt);
44
int init_wh(struct dentry *h_parent, struct aufs_branch *br,
45
struct vfsmount *nfsmnt, struct super_block *sb);
47
struct dentry *sio_diropq(struct dentry *dentry, aufs_bindex_t bindex,
48
int do_create, int dlgt);
50
struct dentry *lkup_wh(struct dentry *h_parent, struct qstr *base_name,
51
struct lkup_args *lkup);
52
struct dentry *simple_create_wh(struct dentry *dentry, aufs_bindex_t bindex,
53
struct dentry *h_parent,
54
struct lkup_args *lkup);
56
struct rmdir_whtmp_arg {
57
struct dentry *h_dentry;
58
struct aufs_nhash whlist;
60
struct inode *dir, *inode;
64
int rmdir_whtmp(struct dentry *h_dentry, struct aufs_nhash *whlist,
65
aufs_bindex_t bindex, struct inode *dir, struct inode *inode);
66
void kick_rmdir_whtmp(struct dentry *h_dentry, struct aufs_nhash *whlist,
67
aufs_bindex_t bindex, struct inode *dir,
68
struct inode *inode, struct rmdir_whtmp_arg *arg);
70
/* ---------------------------------------------------------------------- */
73
struct dentry *create_diropq(struct dentry *dentry, aufs_bindex_t bindex,
76
return sio_diropq(dentry, bindex, 1, dlgt);
80
int remove_diropq(struct dentry *dentry, aufs_bindex_t bindex, int dlgt)
82
return PTR_ERR(sio_diropq(dentry, bindex, 0, dlgt));
85
#endif /* __KERNEL__ */
86
#endif /* __AUFS_WHOUT_H__ */