commit a982d3b5cc5b09021c18dd51ff39d4ae08e2d86c
Author: Erez_Zadok <[EMAIL PROTECTED]>
Date: Fri Jun 29 02:33:14 2007 -0400
Unionfs: rename file->f_dentry references to file->f_path.dentry
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
diff --git a/fs/unionfs/commonfops.c b/fs/unionfs/commonfops.c
index
f7f49b4cabf60cc862b46cf185dc9a619932f28c..18ade2fd76bfb3e808a6c8163a2e9081bf02f0ab
100644
--- a/fs/unionfs/commonfops.c
+++ b/fs/unionfs/commonfops.c
@@ -73,7 +73,7 @@ retry:
dput(tmp_dentry);
err = copyup_named_file(dentry->d_parent->d_inode, file, name, bstart,
- bindex, file->f_dentry->d_inode->i_size);
+ bindex, file->f_path.dentry->d_inode->i_size);
if (err) {
if (err == -EEXIST)
goto retry;
@@ -105,7 +105,7 @@ static void cleanup_file(struct file *fi
{
int bindex, bstart, bend;
struct file **lf;
- struct super_block *sb = file->f_dentry->d_sb;
+ struct super_block *sb = file->f_path.dentry->d_sb;
lf = UNIONFS_F(file)->lower_files;
bstart = fbstart(file);
@@ -157,7 +157,7 @@ static int open_all_files(struct file *f
int bindex, bstart, bend, err = 0;
struct file *lower_file;
struct dentry *lower_dentry;
- struct dentry *dentry = file->f_dentry;
+ struct dentry *dentry = file->f_path.dentry;
struct super_block *sb = dentry->d_sb;
bstart = dbstart(dentry);
@@ -192,7 +192,7 @@ static int open_highest_file(struct file
int bindex, bstart, bend, err = 0;
struct file *lower_file;
struct dentry *lower_dentry;
- struct dentry *dentry = file->f_dentry;
+ struct dentry *dentry = file->f_path.dentry;
struct inode *parent_inode = dentry->d_parent->d_inode;
struct super_block *sb = dentry->d_sb;
size_t inode_size = dentry->d_inode->i_size;
@@ -237,7 +237,7 @@ out:
static int do_delayed_copyup(struct file *file)
{
int bindex, bstart, bend, err = 0;
- struct dentry *dentry = file->f_dentry;
+ struct dentry *dentry = file->f_path.dentry;
struct inode *parent_inode = dentry->d_parent->d_inode;
loff_t inode_size = dentry->d_inode->i_size;
@@ -306,7 +306,7 @@ int unionfs_file_revalidate(struct file
int size;
int err = 0;
- dentry = file->f_dentry;
+ dentry = file->f_path.dentry;
unionfs_lock_dentry(dentry);
sb = dentry->d_sb;
@@ -398,19 +398,19 @@ static int __open_dir(struct inode *inod
struct file *lower_file;
int bindex, bstart, bend;
- bstart = fbstart(file) = dbstart(file->f_dentry);
- bend = fbend(file) = dbend(file->f_dentry);
+ bstart = fbstart(file) = dbstart(file->f_path.dentry);
+ bend = fbend(file) = dbend(file->f_path.dentry);
for (bindex = bstart; bindex <= bend; bindex++) {
lower_dentry =
- unionfs_lower_dentry_idx(file->f_dentry, bindex);
+ unionfs_lower_dentry_idx(file->f_path.dentry, bindex);
if (!lower_dentry)
continue;
dget(lower_dentry);
- unionfs_mntget(file->f_dentry, bindex);
+ unionfs_mntget(file->f_path.dentry, bindex);
lower_file = dentry_open(lower_dentry,
- unionfs_lower_mnt_idx(file->f_dentry,
+
unionfs_lower_mnt_idx(file->f_path.dentry,
bindex),
file->f_flags);
if (IS_ERR(lower_file))
@@ -436,17 +436,17 @@ static int __open_file(struct inode *ino
int lower_flags;
int bindex, bstart, bend;
- lower_dentry = unionfs_lower_dentry(file->f_dentry);
+ lower_dentry = unionfs_lower_dentry(file->f_path.dentry);
lower_flags = file->f_flags;
- bstart = fbstart(file) = dbstart(file->f_dentry);
- bend = fbend(file) = dbend(file->f_dentry);
+ bstart = fbstart(file) = dbstart(file->f_path.dentry);
+ bend = fbend(file) = dbend(file->f_path.dentry);
/*
* check for the permission for lower file. If the error is
* COPYUP_ERR, copyup the file.
*/
- if (lower_dentry->d_inode && is_robranch(file->f_dentry)) {
+ if (lower_dentry->d_inode && is_robranch(file->f_path.dentry)) {
/*
* if the open will change the file, copy it up otherwise
* defer it.
@@ -458,7 +458,7 @@ static int __open_file(struct inode *ino
/* copyup the file */
for (bindex = bstart - 1; bindex >= 0; bindex--) {
err = copyup_file(
- file->f_dentry->d_parent->d_inode,
+ file->f_path.dentry->d_parent->d_inode,
file, bstart, bindex, size);
if (!err)
break;
@@ -474,10 +474,10 @@ static int __open_file(struct inode *ino
* dentry_open will decrement mnt refcnt if err.
* otherwise fput() will do an mntput() for us upon file close.
*/
- unionfs_mntget(file->f_dentry, bstart);
+ unionfs_mntget(file->f_path.dentry, bstart);
lower_file =
dentry_open(lower_dentry,
- unionfs_lower_mnt_idx(file->f_dentry, bstart),
+ unionfs_lower_mnt_idx(file->f_path.dentry, bstart),
lower_flags);
if (IS_ERR(lower_file))
return PTR_ERR(lower_file);
@@ -522,7 +522,7 @@ int unionfs_open(struct inode *inode, st
goto out;
}
- dentry = file->f_dentry;
+ dentry = file->f_path.dentry;
unionfs_lock_dentry(dentry);
bstart = fbstart(file) = dbstart(dentry);
@@ -548,7 +548,7 @@ int unionfs_open(struct inode *inode, st
if (!lower_file)
continue;
- branchput(file->f_dentry->d_sb, bindex);
+ branchput(file->f_path.dentry->d_sb, bindex);
/* fput calls dput for lower_dentry */
fput(lower_file);
}
@@ -567,7 +567,7 @@ out_nofree:
unionfs_check_inode(inode);
if (!err) {
unionfs_check_file(file);
- unionfs_check_dentry(file->f_dentry->d_parent);
+ unionfs_check_dentry(file->f_path.dentry->d_parent);
}
return err;
}
@@ -596,7 +596,7 @@ int unionfs_file_release(struct inode *i
goto out;
unionfs_check_file(file);
fileinfo = UNIONFS_F(file);
- BUG_ON(file->f_dentry->d_inode != inode);
+ BUG_ON(file->f_path.dentry->d_inode != inode);
inodeinfo = UNIONFS_I(inode);
/* fput all the lower files */
@@ -656,7 +656,7 @@ static long do_ioctl(struct file *file,
err = lower_file->f_op->unlocked_ioctl(lower_file, cmd, arg);
} else if (lower_file->f_op->ioctl) {
lock_kernel();
- err = lower_file->f_op->ioctl(lower_file->f_dentry->d_inode,
+ err =
lower_file->f_op->ioctl(lower_file->f_path.dentry->d_inode,
lower_file, cmd, arg);
unlock_kernel();
}
@@ -681,7 +681,7 @@ static int unionfs_ioctl_queryfile(struc
struct dentry *dentry, *lower_dentry;
struct vfsmount *mnt;
- dentry = file->f_dentry;
+ dentry = file->f_path.dentry;
unionfs_lock_dentry(dentry);
orig_bstart = dbstart(dentry);
orig_bend = dbend(dentry);
diff --git a/fs/unionfs/copyup.c b/fs/unionfs/copyup.c
index
9a68813fed373ea29d8f3c13822cc12cacf02485..64bb5ef3c3f0bbc9aa6d31973363b1c1f1c9087e
100644
--- a/fs/unionfs/copyup.c
+++ b/fs/unionfs/copyup.c
@@ -506,7 +506,7 @@ int copyup_named_file(struct inode *dir,
int err = 0;
struct file *output_file = NULL;
- err = copyup_dentry(dir, file->f_dentry, bstart, new_bindex,
+ err = copyup_dentry(dir, file->f_path.dentry, bstart, new_bindex,
name, strlen(name), &output_file, len);
if (!err) {
fbstart(file) = new_bindex;
@@ -525,7 +525,7 @@ int copyup_file(struct inode *dir, struc
{
int err = 0;
struct file *output_file = NULL;
- struct dentry *dentry = file->f_dentry;
+ struct dentry *dentry = file->f_path.dentry;
err = copyup_dentry(dir, dentry, bstart, new_bindex,
dentry->d_name.name, dentry->d_name.len,
diff --git a/fs/unionfs/debug.c b/fs/unionfs/debug.c
index
b4d35d62e7ad15355bc5667621b4f2a7b97377a6..cc9d42ad676c6e95edae7e9efb1fbf62b20a6357
100644
--- a/fs/unionfs/debug.c
+++ b/fs/unionfs/debug.c
@@ -333,7 +333,7 @@ void __unionfs_check_file(const struct f
int printed_caller = 0;
BUG_ON(!file);
- dentry = file->f_dentry;
+ dentry = file->f_path.dentry;
sb = dentry->d_sb;
dstart = dbstart(dentry);
dend = dbend(dentry);
diff --git a/fs/unionfs/dirfops.c b/fs/unionfs/dirfops.c
index
8503411a04852c80a313111b37242d313605ef65..4ba8f6c64d81e67203f30eebd370b78105f89266
100644
--- a/fs/unionfs/dirfops.c
+++ b/fs/unionfs/dirfops.c
@@ -102,7 +102,7 @@ static int unionfs_readdir(struct file *
if ((err = unionfs_file_revalidate(file, 0)))
goto out;
- inode = file->f_dentry->d_inode;
+ inode = file->f_path.dentry->d_inode;
uds = UNIONFS_F(file)->rdstate;
if (!uds) {
@@ -156,7 +156,7 @@ static int unionfs_readdir(struct file *
uds->dirpos = offset;
/* Copy the atime. */
- fsstack_copy_attr_atime(inode, lower_file->f_dentry->d_inode);
+ fsstack_copy_attr_atime(inode,
lower_file->f_path.dentry->d_inode);
if (err < 0)
goto out;
@@ -239,7 +239,7 @@ static loff_t unionfs_dir_llseek(struct
else
err = -EINVAL;
} else {
- rdstate = find_rdstate(file->f_dentry->d_inode,
+ rdstate =
find_rdstate(file->f_path.dentry->d_inode,
offset);
if (rdstate) {
UNIONFS_F(file)->rdstate = rdstate;
diff --git a/fs/unionfs/file.c b/fs/unionfs/file.c
index
8f42da3d2d4a8ffd663d711594bcc6561b5860a4..e978766e715dc6cbc041e1f56cfeecf1d71a8d1a
100644
--- a/fs/unionfs/file.c
+++ b/fs/unionfs/file.c
@@ -79,7 +79,7 @@ static ssize_t unionfs_write(struct file
err = do_sync_write(file, buf, count, ppos);
/* update our inode times upon a successful lower write */
if (err >= 0) {
- unionfs_copy_attr_times(file->f_dentry->d_inode);
+ unionfs_copy_attr_times(file->f_path.dentry->d_inode);
unionfs_check_file(file);
}
@@ -133,9 +133,9 @@ out:
unionfs_read_unlock(file->f_path.dentry->d_sb);
if (!err) {
/* copyup could cause parent dir times to change */
- unionfs_copy_attr_times(file->f_dentry->d_parent->d_inode);
+ unionfs_copy_attr_times(file->f_path.dentry->d_parent->d_inode);
unionfs_check_file(file);
- unionfs_check_dentry(file->f_dentry->d_parent);
+ unionfs_check_dentry(file->f_path.dentry->d_parent);
}
return err;
}
diff --git a/fs/unionfs/mmap.c b/fs/unionfs/mmap.c
index
2abdc871d2c80f57b9dd45e9cb2a5ff278d81008..6f721495dd3dcb2233fadfe6e4c6cf7d6cc370a0
100644
--- a/fs/unionfs/mmap.c
+++ b/fs/unionfs/mmap.c
@@ -121,7 +121,7 @@ static int unionfs_do_readpage(struct fi
struct page *lower_page;
char *lower_page_data;
- dentry = file->f_dentry;
+ dentry = file->f_path.dentry;
if (UNIONFS_F(file) == NULL) {
err = -ENOENT;
goto out_err;
@@ -200,7 +200,7 @@ int unionfs_readpage(struct file *file,
{
int err;
- unionfs_read_lock(file->f_dentry->d_sb);
+ unionfs_read_lock(file->f_path.dentry->d_sb);
if ((err = unionfs_file_revalidate(file, 0)))
goto out;
unionfs_check_file(file);
@@ -210,7 +210,7 @@ int unionfs_readpage(struct file *file,
if (!err) {
touch_atime(unionfs_lower_mnt(file->f_path.dentry),
unionfs_lower_dentry(file->f_path.dentry));
- unionfs_copy_attr_times(file->f_dentry->d_inode);
+ unionfs_copy_attr_times(file->f_path.dentry->d_inode);
}
/*
@@ -221,7 +221,7 @@ int unionfs_readpage(struct file *file,
out:
unlock_page(page);
unionfs_check_file(file);
- unionfs_read_unlock(file->f_dentry->d_sb);
+ unionfs_read_unlock(file->f_path.dentry->d_sb);
return err;
}
@@ -231,7 +231,7 @@ int unionfs_prepare_write(struct file *f
{
int err;
- unionfs_read_lock(file->f_dentry->d_sb);
+ unionfs_read_lock(file->f_path.dentry->d_sb);
/*
* This is the only place where we unconditionally copy the lower
* attribute times before calling unionfs_file_revalidate. The
@@ -243,10 +243,10 @@ int unionfs_prepare_write(struct file *f
* changed lower mtimes, and avoid an invariant violation warning,
* is here, in ->prepare_write.
*/
- unionfs_copy_attr_times(file->f_dentry->d_inode);
+ unionfs_copy_attr_times(file->f_path.dentry->d_inode);
err = unionfs_file_revalidate(file, 1);
unionfs_check_file(file);
- unionfs_read_unlock(file->f_dentry->d_sb);
+ unionfs_read_unlock(file->f_path.dentry->d_sb);
return err;
}
@@ -264,7 +264,7 @@ int unionfs_commit_write(struct file *fi
BUG_ON(file == NULL);
- unionfs_read_lock(file->f_dentry->d_sb);
+ unionfs_read_lock(file->f_path.dentry->d_sb);
if ((err = unionfs_file_revalidate(file, 1)))
goto out;
unionfs_check_file(file);
@@ -312,7 +312,7 @@ out:
if (err < 0)
ClearPageUptodate(page);
- unionfs_read_unlock(file->f_dentry->d_sb);
+ unionfs_read_unlock(file->f_path.dentry->d_sb);
unionfs_check_file(file);
return err; /* assume all is ok */
}
diff --git a/fs/unionfs/rdstate.c b/fs/unionfs/rdstate.c
index
06ad5a81f3319e4d036ebb9f7c3b385e573da332..5c9d14bd0f4c7a67c2d4f1e012a841bc4ac38fa5
100644
--- a/fs/unionfs/rdstate.c
+++ b/fs/unionfs/rdstate.c
@@ -91,7 +91,7 @@ int init_rdstate(struct file *file)
(sizeof(unsigned int) + sizeof(unsigned int)));
BUG_ON(UNIONFS_F(file)->rdstate != NULL);
- UNIONFS_F(file)->rdstate = alloc_rdstate(file->f_dentry->d_inode,
+ UNIONFS_F(file)->rdstate = alloc_rdstate(file->f_path.dentry->d_inode,
fbstart(file));
return (UNIONFS_F(file)->rdstate ? 0 : -ENOMEM);
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs