From: Josef "Jeff" Sipek <jsipek@cs.sunysb.edu>
To: linux-kernel@vger.kernel.org
Cc: linux-fsdevel@vger.kernel.org, akpm@osdl.org, torvalds@osdl.org,
viro@ftp.linux.org.uk, hch@infradead.org
Subject: [PATCH 14 of 23] kernel: change uses of f_{dentry, vfsmnt} to use f_path
Date: Sat, 21 Oct 2006 02:17:39 -0400 [thread overview]
Message-ID: <84ddeab0dabc18d63a67.1161411459@thor.fsl.cs.sunysb.edu> (raw)
In-Reply-To: <patchbomb.1161411445@thor.fsl.cs.sunysb.edu>
From: Josef "Jeff" Sipek <jsipek@cs.sunysb.edu>
This patch changes all the uses of f_{dentry,vfsmnt} to f_path.{dentry,mnt}
in linux/kernel/.
Signed-off-by: Josef "Jeff" Sipek <jsipek@cs.sunysb.edu>
---
5 files changed, 16 insertions(+), 16 deletions(-)
kernel/acct.c | 14 +++++++-------
kernel/fork.c | 2 +-
kernel/futex.c | 10 +++++-----
kernel/relay.c | 4 ++--
kernel/sysctl.c | 2 +-
diff --git a/kernel/acct.c b/kernel/acct.c
--- a/kernel/acct.c
+++ b/kernel/acct.c
@@ -117,7 +117,7 @@ static int check_free_space(struct file
spin_unlock(&acct_globals.lock);
/* May block */
- if (vfs_statfs(file->f_dentry, &sbuf))
+ if (vfs_statfs(file->f_path.dentry, &sbuf))
return res;
suspend = sbuf.f_blocks * SUSPEND;
resume = sbuf.f_blocks * RESUME;
@@ -193,7 +193,7 @@ static void acct_file_reopen(struct file
add_timer(&acct_globals.timer);
}
if (old_acct) {
- mnt_unpin(old_acct->f_vfsmnt);
+ mnt_unpin(old_acct->f_path.mnt);
spin_unlock(&acct_globals.lock);
do_acct_process(old_acct);
filp_close(old_acct, NULL);
@@ -211,7 +211,7 @@ static int acct_on(char *name)
if (IS_ERR(file))
return PTR_ERR(file);
- if (!S_ISREG(file->f_dentry->d_inode->i_mode)) {
+ if (!S_ISREG(file->f_path.dentry->d_inode->i_mode)) {
filp_close(file, NULL);
return -EACCES;
}
@@ -228,11 +228,11 @@ static int acct_on(char *name)
}
spin_lock(&acct_globals.lock);
- mnt_pin(file->f_vfsmnt);
+ mnt_pin(file->f_path.mnt);
acct_file_reopen(file);
spin_unlock(&acct_globals.lock);
- mntput(file->f_vfsmnt); /* it's pinned, now give up active reference */
+ mntput(file->f_path.mnt); /* it's pinned, now give up active reference */
return 0;
}
@@ -282,7 +282,7 @@ void acct_auto_close_mnt(struct vfsmount
void acct_auto_close_mnt(struct vfsmount *m)
{
spin_lock(&acct_globals.lock);
- if (acct_globals.file && acct_globals.file->f_vfsmnt == m)
+ if (acct_globals.file && acct_globals.file->f_path.mnt == m)
acct_file_reopen(NULL);
spin_unlock(&acct_globals.lock);
}
@@ -298,7 +298,7 @@ void acct_auto_close(struct super_block
{
spin_lock(&acct_globals.lock);
if (acct_globals.file &&
- acct_globals.file->f_vfsmnt->mnt_sb == sb) {
+ acct_globals.file->f_path.mnt->mnt_sb == sb) {
acct_file_reopen(NULL);
}
spin_unlock(&acct_globals.lock);
diff --git a/kernel/fork.c b/kernel/fork.c
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -252,7 +252,7 @@ static inline int dup_mmap(struct mm_str
anon_vma_link(tmp);
file = tmp->vm_file;
if (file) {
- struct inode *inode = file->f_dentry->d_inode;
+ struct inode *inode = file->f_path.dentry->d_inode;
get_file(file);
if (tmp->vm_flags & VM_DENYWRITE)
atomic_dec(&inode->i_writecount);
diff --git a/kernel/futex.c b/kernel/futex.c
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -166,7 +166,7 @@ static inline int match_futex(union fute
/*
* Get parameters which are the keys for a futex.
*
- * For shared mappings, it's (page->index, vma->vm_file->f_dentry->d_inode,
+ * For shared mappings, it's (page->index, vma->vm_file->f_path.dentry->d_inode,
* offset_within_page). For private mappings, it's (uaddr, current->mm).
* We can usually work out the index without swapping in the page.
*
@@ -223,7 +223,7 @@ static int get_futex_key(u32 __user *uad
/*
* Linear file mappings are also simple.
*/
- key->shared.inode = vma->vm_file->f_dentry->d_inode;
+ key->shared.inode = vma->vm_file->f_path.dentry->d_inode;
key->both.offset++; /* Bit 0 of offset indicates inode-based key. */
if (likely(!(vma->vm_flags & VM_NONLINEAR))) {
key->shared.pgoff = (((address - vma->vm_start) >> PAGE_SHIFT)
@@ -1522,9 +1522,9 @@ static int futex_fd(u32 __user *uaddr, i
goto out;
}
filp->f_op = &futex_fops;
- filp->f_vfsmnt = mntget(futex_mnt);
- filp->f_dentry = dget(futex_mnt->mnt_root);
- filp->f_mapping = filp->f_dentry->d_inode->i_mapping;
+ filp->f_path.mnt = mntget(futex_mnt);
+ filp->f_path.dentry = dget(futex_mnt->mnt_root);
+ filp->f_mapping = filp->f_path.dentry->d_inode->i_mapping;
if (signal) {
err = __f_setown(filp, task_pid(current), PIDTYPE_PID, 1);
diff --git a/kernel/relay.c b/kernel/relay.c
--- a/kernel/relay.c
+++ b/kernel/relay.c
@@ -957,7 +957,7 @@ static inline ssize_t relay_file_read_su
if (!desc->count)
return 0;
- mutex_lock(&filp->f_dentry->d_inode->i_mutex);
+ mutex_lock(&filp->f_path.dentry->d_inode->i_mutex);
do {
if (!relay_file_read_avail(buf, *ppos))
break;
@@ -977,7 +977,7 @@ static inline ssize_t relay_file_read_su
*ppos = relay_file_read_end_pos(buf, read_start, ret);
}
} while (desc->count && ret);
- mutex_unlock(&filp->f_dentry->d_inode->i_mutex);
+ mutex_unlock(&filp->f_path.dentry->d_inode->i_mutex);
return desc->written;
}
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1614,7 +1614,7 @@ static ssize_t do_rw_proc(int write, str
size_t count, loff_t *ppos)
{
int op;
- struct proc_dir_entry *de = PDE(file->f_dentry->d_inode);
+ struct proc_dir_entry *de = PDE(file->f_path.dentry->d_inode);
struct ctl_table *table;
size_t res;
ssize_t error = -ENOTDIR;
next prev parent reply other threads:[~2006-10-21 7:16 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-21 6:17 [PATCH 00 of 23] struct file: Use struct path Josef Jeff Sipek
2006-10-21 6:17 ` [PATCH 01 of 23] VFS: change struct file to use " Josef Jeff Sipek
2006-10-21 7:22 ` Andrew Morton
2006-10-21 7:28 ` Josef Sipek
2006-10-23 11:47 ` Martin Waitz
2006-10-24 9:03 ` Josef Sipek
2006-10-21 6:17 ` [PATCH 02 of 23] sysfs: change uses of f_{dentry, vfsmnt} to use f_path Josef Jeff Sipek
2006-10-21 6:17 ` [PATCH 03 of 23] proc: " Josef Jeff Sipek
2006-10-21 6:17 ` [PATCH 04 of 23] ext2: " Josef Jeff Sipek
2006-10-21 6:17 ` [PATCH 05 of 23] ext3: " Josef Jeff Sipek
2006-10-21 12:51 ` Robert Peterson
2006-10-21 18:26 ` Josef Sipek
2006-10-21 6:17 ` [PATCH 06 of 23] ext4: " Josef Jeff Sipek
2006-10-21 6:17 ` [PATCH 07 of 23] fat: change uses of f_{dentry,vfsmnt} " Josef Jeff Sipek
2006-10-21 6:17 ` [PATCH 08 of 23] isofs: change uses of f_{dentry, vfsmnt} " Josef Jeff Sipek
2006-10-21 23:13 ` James Morris
2006-10-22 0:11 ` Linus Torvalds
2006-10-21 6:17 ` [PATCH 09 of 23] nfs: change uses of f_{dentry,vfsmnt} " Josef Jeff Sipek
2006-10-21 6:17 ` [PATCH 10 of 23] nfsd: change uses of f_{dentry, vfsmnt} " Josef Jeff Sipek
2006-10-21 6:17 ` [PATCH 11 of 23] ntfs: " Josef Jeff Sipek
2006-10-21 6:17 ` [PATCH 12 of 23] i386: " Josef Jeff Sipek
2006-10-21 6:17 ` [PATCH 13 of 23] x86_64: " Josef Jeff Sipek
2006-10-21 6:17 ` Josef Jeff Sipek [this message]
2006-10-21 6:17 ` [PATCH 15 of 23] mm: change uses of f_{dentry,vfsmnt} " Josef Jeff Sipek
2006-10-21 6:17 ` [PATCH 16 of 23] 9p: " Josef Jeff Sipek
2006-10-21 6:17 ` [PATCH 17 of 23] affs: change uses of f_{dentry, vfsmnt} " Josef Jeff Sipek
2006-10-21 6:17 ` [PATCH 18 of 23] autofs: " Josef Jeff Sipek
2006-10-21 6:17 ` [PATCH 19 of 23] autofs4: " Josef Jeff Sipek
2006-10-21 6:17 ` [PATCH 20 of 23] configfs: " Josef Jeff Sipek
2006-10-21 6:17 ` [PATCH 21 of 23] cifs: " Josef Jeff Sipek
2006-10-21 6:17 ` [PATCH 22 of 23] ecryptfs: " Josef Jeff Sipek
2006-10-21 6:17 ` [PATCH 23 of 23] xfs: change uses of f_{dentry,vfsmnt} " Josef Jeff Sipek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=84ddeab0dabc18d63a67.1161411459@thor.fsl.cs.sunysb.edu \
--to=jsipek@cs.sunysb.edu \
--cc=akpm@osdl.org \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
--cc=viro@ftp.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®