]>
git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blob - fs/aufs/hfsplus.c
2 * Copyright (C) 2010-2016 Junjiro R. 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, see <http://www.gnu.org/licenses/>.
19 * special support for filesystems which aqucires an inode mutex
20 * at final closing a file, eg, hfsplus.
22 * This trick is very simple and stupid, just to open the file before really
23 * neceeary open to tell hfsplus that this is not the final closing.
24 * The caller should call au_h_open_pre() after acquiring the inode mutex,
25 * and au_h_open_post() after releasing it.
30 struct file
*au_h_open_pre(struct dentry
*dentry
, aufs_bindex_t bindex
,
34 struct dentry
*h_dentry
;
36 h_dentry
= au_h_dptr(dentry
, bindex
);
38 AuDebugOn(d_is_negative(h_dentry
));
41 if (au_test_hfsplus(h_dentry
->d_sb
)
42 && d_is_reg(h_dentry
))
43 h_file
= au_h_open(dentry
, bindex
,
44 O_RDONLY
| O_NOATIME
| O_LARGEFILE
,
45 /*file*/NULL
, force_wr
);
49 void au_h_open_post(struct dentry
*dentry
, aufs_bindex_t bindex
,
54 au_sbr_put(dentry
->d_sb
, bindex
);