Commit 7eaa36e2 authored by Josef "Jeff" Sipek's avatar Josef "Jeff" Sipek Committed by Linus Torvalds

[PATCH] nfsd: change uses of f_{dentry, vfsmnt} to use f_path

Change all the uses of f_{dentry,vfsmnt} to f_path.{dentry,mnt} in the nfs
server code.
Signed-off-by: default avatarJosef "Jeff" Sipek <jsipek@cs.sunysb.edu>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 01cce933
...@@ -1310,7 +1310,7 @@ static inline void ...@@ -1310,7 +1310,7 @@ static inline void
nfs4_file_downgrade(struct file *filp, unsigned int share_access) nfs4_file_downgrade(struct file *filp, unsigned int share_access)
{ {
if (share_access & NFS4_SHARE_ACCESS_WRITE) { if (share_access & NFS4_SHARE_ACCESS_WRITE) {
put_write_access(filp->f_dentry->d_inode); put_write_access(filp->f_path.dentry->d_inode);
filp->f_mode = (filp->f_mode | FMODE_READ) & ~FMODE_WRITE; filp->f_mode = (filp->f_mode | FMODE_READ) & ~FMODE_WRITE;
} }
} }
...@@ -1623,7 +1623,7 @@ static __be32 ...@@ -1623,7 +1623,7 @@ static __be32
nfs4_upgrade_open(struct svc_rqst *rqstp, struct svc_fh *cur_fh, struct nfs4_stateid *stp, struct nfsd4_open *open) nfs4_upgrade_open(struct svc_rqst *rqstp, struct svc_fh *cur_fh, struct nfs4_stateid *stp, struct nfsd4_open *open)
{ {
struct file *filp = stp->st_vfs_file; struct file *filp = stp->st_vfs_file;
struct inode *inode = filp->f_dentry->d_inode; struct inode *inode = filp->f_path.dentry->d_inode;
unsigned int share_access, new_writer; unsigned int share_access, new_writer;
__be32 status; __be32 status;
...@@ -1965,7 +1965,7 @@ search_close_lru(u32 st_id, int flags) ...@@ -1965,7 +1965,7 @@ search_close_lru(u32 st_id, int flags)
static inline int static inline int
nfs4_check_fh(struct svc_fh *fhp, struct nfs4_stateid *stp) nfs4_check_fh(struct svc_fh *fhp, struct nfs4_stateid *stp)
{ {
return fhp->fh_dentry->d_inode != stp->st_vfs_file->f_dentry->d_inode; return fhp->fh_dentry->d_inode != stp->st_vfs_file->f_path.dentry->d_inode;
} }
static int static int
...@@ -2862,7 +2862,7 @@ nfsd4_lockt(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock ...@@ -2862,7 +2862,7 @@ nfsd4_lockt(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock
* only the dentry:inode set. * only the dentry:inode set.
*/ */
memset(&file, 0, sizeof (struct file)); memset(&file, 0, sizeof (struct file));
file.f_dentry = current_fh->fh_dentry; file.f_path.dentry = current_fh->fh_dentry;
status = nfs_ok; status = nfs_ok;
if (posix_test_lock(&file, &file_lock, &conflock)) { if (posix_test_lock(&file, &file_lock, &conflock)) {
...@@ -2952,7 +2952,7 @@ static int ...@@ -2952,7 +2952,7 @@ static int
check_for_locks(struct file *filp, struct nfs4_stateowner *lowner) check_for_locks(struct file *filp, struct nfs4_stateowner *lowner)
{ {
struct file_lock **flpp; struct file_lock **flpp;
struct inode *inode = filp->f_dentry->d_inode; struct inode *inode = filp->f_path.dentry->d_inode;
int status = 0; int status = 0;
lock_kernel(); lock_kernel();
......
...@@ -111,7 +111,7 @@ static ssize_t (*write_op[])(struct file *, char *, size_t) = { ...@@ -111,7 +111,7 @@ static ssize_t (*write_op[])(struct file *, char *, size_t) = {
static ssize_t nfsctl_transaction_write(struct file *file, const char __user *buf, size_t size, loff_t *pos) static ssize_t nfsctl_transaction_write(struct file *file, const char __user *buf, size_t size, loff_t *pos)
{ {
ino_t ino = file->f_dentry->d_inode->i_ino; ino_t ino = file->f_path.dentry->d_inode->i_ino;
char *data; char *data;
ssize_t rv; ssize_t rv;
......
...@@ -736,10 +736,10 @@ static int ...@@ -736,10 +736,10 @@ static int
nfsd_sync(struct file *filp) nfsd_sync(struct file *filp)
{ {
int err; int err;
struct inode *inode = filp->f_dentry->d_inode; struct inode *inode = filp->f_path.dentry->d_inode;
dprintk("nfsd: sync file %s\n", filp->f_dentry->d_name.name); dprintk("nfsd: sync file %s\n", filp->f_path.dentry->d_name.name);
mutex_lock(&inode->i_mutex); mutex_lock(&inode->i_mutex);
err=nfsd_dosync(filp, filp->f_dentry, filp->f_op); err=nfsd_dosync(filp, filp->f_path.dentry, filp->f_op);
mutex_unlock(&inode->i_mutex); mutex_unlock(&inode->i_mutex);
return err; return err;
...@@ -845,7 +845,7 @@ nfsd_vfs_read(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file, ...@@ -845,7 +845,7 @@ nfsd_vfs_read(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
int host_err; int host_err;
err = nfserr_perm; err = nfserr_perm;
inode = file->f_dentry->d_inode; inode = file->f_path.dentry->d_inode;
#ifdef MSNFS #ifdef MSNFS
if ((fhp->fh_export->ex_flags & NFSEXP_MSNFS) && if ((fhp->fh_export->ex_flags & NFSEXP_MSNFS) &&
(!lock_may_read(inode, offset, *count))) (!lock_may_read(inode, offset, *count)))
...@@ -883,7 +883,7 @@ nfsd_vfs_read(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file, ...@@ -883,7 +883,7 @@ nfsd_vfs_read(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
nfsdstats.io_read += host_err; nfsdstats.io_read += host_err;
*count = host_err; *count = host_err;
err = 0; err = 0;
fsnotify_access(file->f_dentry); fsnotify_access(file->f_path.dentry);
} else } else
err = nfserrno(host_err); err = nfserrno(host_err);
out: out:
...@@ -917,11 +917,11 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file, ...@@ -917,11 +917,11 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
err = nfserr_perm; err = nfserr_perm;
if ((fhp->fh_export->ex_flags & NFSEXP_MSNFS) && if ((fhp->fh_export->ex_flags & NFSEXP_MSNFS) &&
(!lock_may_write(file->f_dentry->d_inode, offset, cnt))) (!lock_may_write(file->f_path.dentry->d_inode, offset, cnt)))
goto out; goto out;
#endif #endif
dentry = file->f_dentry; dentry = file->f_path.dentry;
inode = dentry->d_inode; inode = dentry->d_inode;
exp = fhp->fh_export; exp = fhp->fh_export;
...@@ -950,7 +950,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file, ...@@ -950,7 +950,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
set_fs(oldfs); set_fs(oldfs);
if (host_err >= 0) { if (host_err >= 0) {
nfsdstats.io_write += cnt; nfsdstats.io_write += cnt;
fsnotify_modify(file->f_dentry); fsnotify_modify(file->f_path.dentry);
} }
/* clear setuid/setgid flag after write */ /* clear setuid/setgid flag after write */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment