}
dget(odf_cache);
- mntget(UNIONFS_SB(file->f_path.dentry->d_sb)->odf.mnt);
+ mntget(UNIONFS_SB(file->f_path.dentry->d_sb)->odf.path.mnt);
odf_file = dentry_open(odf_cache,
- UNIONFS_SB(file->f_path.dentry->d_sb)->odf.mnt,
+ UNIONFS_SB(file->f_path.dentry->d_sb)->odf.path.mnt,
O_RDONLY);
if (IS_ERR(odf_file)) {
err = PTR_ERR(odf_file);
- mntput(UNIONFS_SB(file->f_path.dentry->d_sb)->odf.mnt);
+ mntput(UNIONFS_SB(file->f_path.dentry->d_sb)->odf.path.mnt);
dput(odf_cache);
odf_file = NULL;
goto out;
goto out;
}
dget(d_odf);
- mntget(UNIONFS_SB(sb)->odf.mnt);
+ mntget(UNIONFS_SB(sb)->odf.path.mnt);
/* force truncate if file exists */
if (i_odf) {
goto out;
}
odf_file = dentry_open(d_odf,
- UNIONFS_SB(sb)->odf.mnt,
+ UNIONFS_SB(sb)->odf.path.mnt,
O_TRUNC|O_CREAT|O_WRONLY);
if (IS_ERR(odf_file)) {
err = PTR_ERR(odf_file);
dput(d_odf);
- mntput(UNIONFS_SB(sb)->odf.mnt);
+ mntput(UNIONFS_SB(sb)->odf.path.mnt);
odf_file = NULL;
goto out;
}
goto out;
}
buf->err = 0;
- buf->mnt = odf->mnt;
+ buf->mnt = odf->path.mnt;
buf->mode = CLN_IC;
buf->blocks = 0;
buf->inodes = 0;
*/
if (buf->mode != CLN_IC)
dget(dentry);
- mntget(odf->mnt);
+ mntget(odf->path.mnt);
- file = dentry_open(dentry, odf->mnt, O_RDONLY);
+ file = dentry_open(dentry, odf->path.mnt, O_RDONLY);
if (IS_ERR(file)) {
err = PTR_ERR(file);
dput(dentry);
}
dget(odf_cache);
- mntget(UNIONFS_SB(dentry->d_sb)->odf.mnt);
- file = dentry_open(odf_cache, UNIONFS_SB(dentry->d_sb)->odf.mnt,
+ mntget(UNIONFS_SB(dentry->d_sb)->odf.path.mnt);
+ file = dentry_open(odf_cache, UNIONFS_SB(dentry->d_sb)->odf.path.mnt,
O_RDONLY);
if (IS_ERR(file)) {
err = PTR_ERR(file);
- mntput(UNIONFS_SB(dentry->d_sb)->odf.mnt);
+ mntput(UNIONFS_SB(dentry->d_sb)->odf.path.mnt);
dput(odf_cache);
file = NULL;
goto out;
ODF_CLEAN_DEFAULT :
ODF_CLEAN_SR|ODF_CLEAN_FULL);
osi->cleanup = sioa;
- osi->mnt = nd.mnt;
- mntget(osi->mnt);
- dget(nd.dentry);
+ osi->path.mnt = nd.mnt;
+ osi->path.dentry = nd.dentry;
+ pathget(&osi->path);
path_release(&nd);
goto out;
*/
void odf_put_super(struct odf_sb_info *osi)
{
- struct dentry *odf_root = NULL;
-
if (osi->cleanup)
complete_sioa(osi->cleanup);
kfree(osi->cleanup);
- if (osi->sb)
- odf_root = osi->sb->d_parent;
-
dput(osi->ns);
osi->ns = NULL;
dput(osi->rc);
kfree(osi->branch_uuids);
osi->branch_uuids = NULL;
- dput(odf_root);
- mntput(osi->mnt);
+ pathput(&osi->path);
}
/*
/* open the file */
dget(links);
- mntget(osi->mnt);
- link_file = dentry_open(links, osi->mnt, O_RDWR);
+ mntget(osi->path.mnt);
+ link_file = dentry_open(links, osi->path.mnt, O_RDWR);
if (IS_ERR(link_file)) {
err = PTR_ERR(link_file);
link_file = NULL;
dput(links);
- mntput(osi->mnt);
+ mntput(osi->path.mnt);
goto out;
}
/* open the file */
dget(links);
- mntget(osi->mnt);
- link_file = dentry_open(links, osi->mnt, O_RDWR);
+ mntget(osi->path.mnt);
+ link_file = dentry_open(links, osi->path.mnt, O_RDWR);
if (IS_ERR(link_file)) {
err = PTR_ERR(link_file);
link_file = NULL;
dput(links);
- mntput(osi->mnt);
+ mntput(osi->path.mnt);
goto out;
}
goto out;
}
- odf_mnt = osi->mnt;
+ odf_mnt = osi->path.mnt;
d_content = osi->sb;
if (IS_ERR(d_content) || !d_content) {
goto out_err;
}
- mntget(odf_sb->mnt);
- file = dentry_open(d_content, odf_sb->mnt, O_RDONLY);
+ mntget(odf_sb->path.mnt);
+ file = dentry_open(d_content, odf_sb->path.mnt, O_RDONLY);
if (IS_ERR(file)) {
- mntput(odf_sb->mnt);
+ mntput(odf_sb->path.mnt);
dput(d_content);
goto out_err;
}
/* odf sb data */
struct odf_sb_info {
- struct vfsmount *mnt; /* odf vfsmount */
+ struct path path; /* odf path (vfsmount+dentry) */
struct dentry *ns; /* namespace (/odf/ns) */
struct dentry *rc; /* reclaim (/odf/reclaim) */
struct dentry *ic; /* inode cache (/odf/ic) */