diff options
author | Josef "Jeff" Sipek <jsipek@cs.sunysb.edu> | 2006-12-08 05:36:40 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-08 11:28:41 -0500 |
commit | 01cce933d8b524d9312f5098c70fa1b6ac190572 (patch) | |
tree | 7601e02e874a6eb44faca3cdf06664c7377ac687 /fs/nfs | |
parent | 2485822d51f8b338d289abe00eb7ce5249794a08 (diff) |
[PATCH] nfs: 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
client code.
Signed-off-by: Josef "Jeff" Sipek <jsipek@cs.sunysb.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/dir.c | 18 | ||||
-rw-r--r-- | fs/nfs/direct.c | 10 | ||||
-rw-r--r-- | fs/nfs/file.c | 14 | ||||
-rw-r--r-- | fs/nfs/idmap.c | 2 | ||||
-rw-r--r-- | fs/nfs/inode.c | 6 | ||||
-rw-r--r-- | fs/nfs/nfs3proc.c | 2 | ||||
-rw-r--r-- | fs/nfs/proc.c | 2 | ||||
-rw-r--r-- | fs/nfs/write.c | 4 |
8 files changed, 29 insertions, 29 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index b34cd16f472f..dee3d6c0f194 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
@@ -172,7 +172,7 @@ static | |||
172 | int nfs_readdir_filler(nfs_readdir_descriptor_t *desc, struct page *page) | 172 | int nfs_readdir_filler(nfs_readdir_descriptor_t *desc, struct page *page) |
173 | { | 173 | { |
174 | struct file *file = desc->file; | 174 | struct file *file = desc->file; |
175 | struct inode *inode = file->f_dentry->d_inode; | 175 | struct inode *inode = file->f_path.dentry->d_inode; |
176 | struct rpc_cred *cred = nfs_file_cred(file); | 176 | struct rpc_cred *cred = nfs_file_cred(file); |
177 | unsigned long timestamp; | 177 | unsigned long timestamp; |
178 | int error; | 178 | int error; |
@@ -183,7 +183,7 @@ int nfs_readdir_filler(nfs_readdir_descriptor_t *desc, struct page *page) | |||
183 | 183 | ||
184 | again: | 184 | again: |
185 | timestamp = jiffies; | 185 | timestamp = jiffies; |
186 | error = NFS_PROTO(inode)->readdir(file->f_dentry, cred, desc->entry->cookie, page, | 186 | error = NFS_PROTO(inode)->readdir(file->f_path.dentry, cred, desc->entry->cookie, page, |
187 | NFS_SERVER(inode)->dtsize, desc->plus); | 187 | NFS_SERVER(inode)->dtsize, desc->plus); |
188 | if (error < 0) { | 188 | if (error < 0) { |
189 | /* We requested READDIRPLUS, but the server doesn't grok it */ | 189 | /* We requested READDIRPLUS, but the server doesn't grok it */ |
@@ -308,7 +308,7 @@ int find_dirent_index(nfs_readdir_descriptor_t *desc) | |||
308 | static inline | 308 | static inline |
309 | int find_dirent_page(nfs_readdir_descriptor_t *desc) | 309 | int find_dirent_page(nfs_readdir_descriptor_t *desc) |
310 | { | 310 | { |
311 | struct inode *inode = desc->file->f_dentry->d_inode; | 311 | struct inode *inode = desc->file->f_path.dentry->d_inode; |
312 | struct page *page; | 312 | struct page *page; |
313 | int status; | 313 | int status; |
314 | 314 | ||
@@ -464,7 +464,7 @@ int uncached_readdir(nfs_readdir_descriptor_t *desc, void *dirent, | |||
464 | filldir_t filldir) | 464 | filldir_t filldir) |
465 | { | 465 | { |
466 | struct file *file = desc->file; | 466 | struct file *file = desc->file; |
467 | struct inode *inode = file->f_dentry->d_inode; | 467 | struct inode *inode = file->f_path.dentry->d_inode; |
468 | struct rpc_cred *cred = nfs_file_cred(file); | 468 | struct rpc_cred *cred = nfs_file_cred(file); |
469 | struct page *page = NULL; | 469 | struct page *page = NULL; |
470 | int status; | 470 | int status; |
@@ -477,7 +477,7 @@ int uncached_readdir(nfs_readdir_descriptor_t *desc, void *dirent, | |||
477 | status = -ENOMEM; | 477 | status = -ENOMEM; |
478 | goto out; | 478 | goto out; |
479 | } | 479 | } |
480 | desc->error = NFS_PROTO(inode)->readdir(file->f_dentry, cred, *desc->dir_cookie, | 480 | desc->error = NFS_PROTO(inode)->readdir(file->f_path.dentry, cred, *desc->dir_cookie, |
481 | page, | 481 | page, |
482 | NFS_SERVER(inode)->dtsize, | 482 | NFS_SERVER(inode)->dtsize, |
483 | desc->plus); | 483 | desc->plus); |
@@ -516,7 +516,7 @@ int uncached_readdir(nfs_readdir_descriptor_t *desc, void *dirent, | |||
516 | */ | 516 | */ |
517 | static int nfs_readdir(struct file *filp, void *dirent, filldir_t filldir) | 517 | static int nfs_readdir(struct file *filp, void *dirent, filldir_t filldir) |
518 | { | 518 | { |
519 | struct dentry *dentry = filp->f_dentry; | 519 | struct dentry *dentry = filp->f_path.dentry; |
520 | struct inode *inode = dentry->d_inode; | 520 | struct inode *inode = dentry->d_inode; |
521 | nfs_readdir_descriptor_t my_desc, | 521 | nfs_readdir_descriptor_t my_desc, |
522 | *desc = &my_desc; | 522 | *desc = &my_desc; |
@@ -599,7 +599,7 @@ static int nfs_readdir(struct file *filp, void *dirent, filldir_t filldir) | |||
599 | 599 | ||
600 | loff_t nfs_llseek_dir(struct file *filp, loff_t offset, int origin) | 600 | loff_t nfs_llseek_dir(struct file *filp, loff_t offset, int origin) |
601 | { | 601 | { |
602 | mutex_lock(&filp->f_dentry->d_inode->i_mutex); | 602 | mutex_lock(&filp->f_path.dentry->d_inode->i_mutex); |
603 | switch (origin) { | 603 | switch (origin) { |
604 | case 1: | 604 | case 1: |
605 | offset += filp->f_pos; | 605 | offset += filp->f_pos; |
@@ -615,7 +615,7 @@ loff_t nfs_llseek_dir(struct file *filp, loff_t offset, int origin) | |||
615 | ((struct nfs_open_context *)filp->private_data)->dir_cookie = 0; | 615 | ((struct nfs_open_context *)filp->private_data)->dir_cookie = 0; |
616 | } | 616 | } |
617 | out: | 617 | out: |
618 | mutex_unlock(&filp->f_dentry->d_inode->i_mutex); | 618 | mutex_unlock(&filp->f_path.dentry->d_inode->i_mutex); |
619 | return offset; | 619 | return offset; |
620 | } | 620 | } |
621 | 621 | ||
@@ -1102,7 +1102,7 @@ no_open: | |||
1102 | 1102 | ||
1103 | static struct dentry *nfs_readdir_lookup(nfs_readdir_descriptor_t *desc) | 1103 | static struct dentry *nfs_readdir_lookup(nfs_readdir_descriptor_t *desc) |
1104 | { | 1104 | { |
1105 | struct dentry *parent = desc->file->f_dentry; | 1105 | struct dentry *parent = desc->file->f_path.dentry; |
1106 | struct inode *dir = parent->d_inode; | 1106 | struct inode *dir = parent->d_inode; |
1107 | struct nfs_entry *entry = desc->entry; | 1107 | struct nfs_entry *entry = desc->entry; |
1108 | struct dentry *dentry, *alias; | 1108 | struct dentry *dentry, *alias; |
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index f9d678f4ae06..bd21d7fde650 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c | |||
@@ -116,7 +116,7 @@ static inline int put_dreq(struct nfs_direct_req *dreq) | |||
116 | ssize_t nfs_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov, loff_t pos, unsigned long nr_segs) | 116 | ssize_t nfs_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov, loff_t pos, unsigned long nr_segs) |
117 | { | 117 | { |
118 | dprintk("NFS: nfs_direct_IO (%s) off/no(%Ld/%lu) EINVAL\n", | 118 | dprintk("NFS: nfs_direct_IO (%s) off/no(%Ld/%lu) EINVAL\n", |
119 | iocb->ki_filp->f_dentry->d_name.name, | 119 | iocb->ki_filp->f_path.dentry->d_name.name, |
120 | (long long) pos, nr_segs); | 120 | (long long) pos, nr_segs); |
121 | 121 | ||
122 | return -EINVAL; | 122 | return -EINVAL; |
@@ -734,8 +734,8 @@ ssize_t nfs_file_direct_read(struct kiocb *iocb, const struct iovec *iov, | |||
734 | size_t count = iov[0].iov_len; | 734 | size_t count = iov[0].iov_len; |
735 | 735 | ||
736 | dprintk("nfs: direct read(%s/%s, %lu@%Ld)\n", | 736 | dprintk("nfs: direct read(%s/%s, %lu@%Ld)\n", |
737 | file->f_dentry->d_parent->d_name.name, | 737 | file->f_path.dentry->d_parent->d_name.name, |
738 | file->f_dentry->d_name.name, | 738 | file->f_path.dentry->d_name.name, |
739 | (unsigned long) count, (long long) pos); | 739 | (unsigned long) count, (long long) pos); |
740 | 740 | ||
741 | if (nr_segs != 1) | 741 | if (nr_segs != 1) |
@@ -798,8 +798,8 @@ ssize_t nfs_file_direct_write(struct kiocb *iocb, const struct iovec *iov, | |||
798 | size_t count = iov[0].iov_len; | 798 | size_t count = iov[0].iov_len; |
799 | 799 | ||
800 | dfprintk(VFS, "nfs: direct write(%s/%s, %lu@%Ld)\n", | 800 | dfprintk(VFS, "nfs: direct write(%s/%s, %lu@%Ld)\n", |
801 | file->f_dentry->d_parent->d_name.name, | 801 | file->f_path.dentry->d_parent->d_name.name, |
802 | file->f_dentry->d_name.name, | 802 | file->f_path.dentry->d_name.name, |
803 | (unsigned long) count, (long long) pos); | 803 | (unsigned long) count, (long long) pos); |
804 | 804 | ||
805 | if (nr_segs != 1) | 805 | if (nr_segs != 1) |
diff --git a/fs/nfs/file.c b/fs/nfs/file.c index 8e28bffc35a0..0dd6be346aa7 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c | |||
@@ -176,7 +176,7 @@ static int | |||
176 | nfs_file_flush(struct file *file, fl_owner_t id) | 176 | nfs_file_flush(struct file *file, fl_owner_t id) |
177 | { | 177 | { |
178 | struct nfs_open_context *ctx = (struct nfs_open_context *)file->private_data; | 178 | struct nfs_open_context *ctx = (struct nfs_open_context *)file->private_data; |
179 | struct inode *inode = file->f_dentry->d_inode; | 179 | struct inode *inode = file->f_path.dentry->d_inode; |
180 | int status; | 180 | int status; |
181 | 181 | ||
182 | dfprintk(VFS, "nfs: flush(%s/%ld)\n", inode->i_sb->s_id, inode->i_ino); | 182 | dfprintk(VFS, "nfs: flush(%s/%ld)\n", inode->i_sb->s_id, inode->i_ino); |
@@ -201,7 +201,7 @@ static ssize_t | |||
201 | nfs_file_read(struct kiocb *iocb, const struct iovec *iov, | 201 | nfs_file_read(struct kiocb *iocb, const struct iovec *iov, |
202 | unsigned long nr_segs, loff_t pos) | 202 | unsigned long nr_segs, loff_t pos) |
203 | { | 203 | { |
204 | struct dentry * dentry = iocb->ki_filp->f_dentry; | 204 | struct dentry * dentry = iocb->ki_filp->f_path.dentry; |
205 | struct inode * inode = dentry->d_inode; | 205 | struct inode * inode = dentry->d_inode; |
206 | ssize_t result; | 206 | ssize_t result; |
207 | size_t count = iov_length(iov, nr_segs); | 207 | size_t count = iov_length(iov, nr_segs); |
@@ -226,7 +226,7 @@ static ssize_t | |||
226 | nfs_file_sendfile(struct file *filp, loff_t *ppos, size_t count, | 226 | nfs_file_sendfile(struct file *filp, loff_t *ppos, size_t count, |
227 | read_actor_t actor, void *target) | 227 | read_actor_t actor, void *target) |
228 | { | 228 | { |
229 | struct dentry *dentry = filp->f_dentry; | 229 | struct dentry *dentry = filp->f_path.dentry; |
230 | struct inode *inode = dentry->d_inode; | 230 | struct inode *inode = dentry->d_inode; |
231 | ssize_t res; | 231 | ssize_t res; |
232 | 232 | ||
@@ -243,7 +243,7 @@ nfs_file_sendfile(struct file *filp, loff_t *ppos, size_t count, | |||
243 | static int | 243 | static int |
244 | nfs_file_mmap(struct file * file, struct vm_area_struct * vma) | 244 | nfs_file_mmap(struct file * file, struct vm_area_struct * vma) |
245 | { | 245 | { |
246 | struct dentry *dentry = file->f_dentry; | 246 | struct dentry *dentry = file->f_path.dentry; |
247 | struct inode *inode = dentry->d_inode; | 247 | struct inode *inode = dentry->d_inode; |
248 | int status; | 248 | int status; |
249 | 249 | ||
@@ -343,7 +343,7 @@ const struct address_space_operations nfs_file_aops = { | |||
343 | static ssize_t nfs_file_write(struct kiocb *iocb, const struct iovec *iov, | 343 | static ssize_t nfs_file_write(struct kiocb *iocb, const struct iovec *iov, |
344 | unsigned long nr_segs, loff_t pos) | 344 | unsigned long nr_segs, loff_t pos) |
345 | { | 345 | { |
346 | struct dentry * dentry = iocb->ki_filp->f_dentry; | 346 | struct dentry * dentry = iocb->ki_filp->f_path.dentry; |
347 | struct inode * inode = dentry->d_inode; | 347 | struct inode * inode = dentry->d_inode; |
348 | ssize_t result; | 348 | ssize_t result; |
349 | size_t count = iov_length(iov, nr_segs); | 349 | size_t count = iov_length(iov, nr_segs); |
@@ -535,8 +535,8 @@ static int nfs_lock(struct file *filp, int cmd, struct file_lock *fl) | |||
535 | static int nfs_flock(struct file *filp, int cmd, struct file_lock *fl) | 535 | static int nfs_flock(struct file *filp, int cmd, struct file_lock *fl) |
536 | { | 536 | { |
537 | dprintk("NFS: nfs_flock(f=%s/%ld, t=%x, fl=%x)\n", | 537 | dprintk("NFS: nfs_flock(f=%s/%ld, t=%x, fl=%x)\n", |
538 | filp->f_dentry->d_inode->i_sb->s_id, | 538 | filp->f_path.dentry->d_inode->i_sb->s_id, |
539 | filp->f_dentry->d_inode->i_ino, | 539 | filp->f_path.dentry->d_inode->i_ino, |
540 | fl->fl_type, fl->fl_flags); | 540 | fl->fl_type, fl->fl_flags); |
541 | 541 | ||
542 | /* | 542 | /* |
diff --git a/fs/nfs/idmap.c b/fs/nfs/idmap.c index 82ad7110a1c0..9d4a6b2d1996 100644 --- a/fs/nfs/idmap.c +++ b/fs/nfs/idmap.c | |||
@@ -377,7 +377,7 @@ idmap_pipe_upcall(struct file *filp, struct rpc_pipe_msg *msg, | |||
377 | static ssize_t | 377 | static ssize_t |
378 | idmap_pipe_downcall(struct file *filp, const char __user *src, size_t mlen) | 378 | idmap_pipe_downcall(struct file *filp, const char __user *src, size_t mlen) |
379 | { | 379 | { |
380 | struct rpc_inode *rpci = RPC_I(filp->f_dentry->d_inode); | 380 | struct rpc_inode *rpci = RPC_I(filp->f_path.dentry->d_inode); |
381 | struct idmap *idmap = (struct idmap *)rpci->private; | 381 | struct idmap *idmap = (struct idmap *)rpci->private; |
382 | struct idmap_msg im_in, *im = &idmap->idmap_im; | 382 | struct idmap_msg im_in, *im = &idmap->idmap_im; |
383 | struct idmap_hashtable *h; | 383 | struct idmap_hashtable *h; |
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 36680d1061b0..63e470279309 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -496,7 +496,7 @@ void put_nfs_open_context(struct nfs_open_context *ctx) | |||
496 | */ | 496 | */ |
497 | static void nfs_file_set_open_context(struct file *filp, struct nfs_open_context *ctx) | 497 | static void nfs_file_set_open_context(struct file *filp, struct nfs_open_context *ctx) |
498 | { | 498 | { |
499 | struct inode *inode = filp->f_dentry->d_inode; | 499 | struct inode *inode = filp->f_path.dentry->d_inode; |
500 | struct nfs_inode *nfsi = NFS_I(inode); | 500 | struct nfs_inode *nfsi = NFS_I(inode); |
501 | 501 | ||
502 | filp->private_data = get_nfs_open_context(ctx); | 502 | filp->private_data = get_nfs_open_context(ctx); |
@@ -528,7 +528,7 @@ struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_c | |||
528 | 528 | ||
529 | static void nfs_file_clear_open_context(struct file *filp) | 529 | static void nfs_file_clear_open_context(struct file *filp) |
530 | { | 530 | { |
531 | struct inode *inode = filp->f_dentry->d_inode; | 531 | struct inode *inode = filp->f_path.dentry->d_inode; |
532 | struct nfs_open_context *ctx = (struct nfs_open_context *)filp->private_data; | 532 | struct nfs_open_context *ctx = (struct nfs_open_context *)filp->private_data; |
533 | 533 | ||
534 | if (ctx) { | 534 | if (ctx) { |
@@ -551,7 +551,7 @@ int nfs_open(struct inode *inode, struct file *filp) | |||
551 | cred = rpcauth_lookupcred(NFS_CLIENT(inode)->cl_auth, 0); | 551 | cred = rpcauth_lookupcred(NFS_CLIENT(inode)->cl_auth, 0); |
552 | if (IS_ERR(cred)) | 552 | if (IS_ERR(cred)) |
553 | return PTR_ERR(cred); | 553 | return PTR_ERR(cred); |
554 | ctx = alloc_nfs_open_context(filp->f_vfsmnt, filp->f_dentry, cred); | 554 | ctx = alloc_nfs_open_context(filp->f_path.mnt, filp->f_path.dentry, cred); |
555 | put_rpccred(cred); | 555 | put_rpccred(cred); |
556 | if (ctx == NULL) | 556 | if (ctx == NULL) |
557 | return -ENOMEM; | 557 | return -ENOMEM; |
diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c index 510ae524f3fd..acd8fe9762d3 100644 --- a/fs/nfs/nfs3proc.c +++ b/fs/nfs/nfs3proc.c | |||
@@ -841,7 +841,7 @@ static void nfs3_proc_commit_setup(struct nfs_write_data *data, int how) | |||
841 | static int | 841 | static int |
842 | nfs3_proc_lock(struct file *filp, int cmd, struct file_lock *fl) | 842 | nfs3_proc_lock(struct file *filp, int cmd, struct file_lock *fl) |
843 | { | 843 | { |
844 | return nlmclnt_proc(filp->f_dentry->d_inode, cmd, fl); | 844 | return nlmclnt_proc(filp->f_path.dentry->d_inode, cmd, fl); |
845 | } | 845 | } |
846 | 846 | ||
847 | const struct nfs_rpc_ops nfs_v3_clientops = { | 847 | const struct nfs_rpc_ops nfs_v3_clientops = { |
diff --git a/fs/nfs/proc.c b/fs/nfs/proc.c index 10f5e80ca157..560536ad74a4 100644 --- a/fs/nfs/proc.c +++ b/fs/nfs/proc.c | |||
@@ -651,7 +651,7 @@ nfs_proc_commit_setup(struct nfs_write_data *data, int how) | |||
651 | static int | 651 | static int |
652 | nfs_proc_lock(struct file *filp, int cmd, struct file_lock *fl) | 652 | nfs_proc_lock(struct file *filp, int cmd, struct file_lock *fl) |
653 | { | 653 | { |
654 | return nlmclnt_proc(filp->f_dentry->d_inode, cmd, fl); | 654 | return nlmclnt_proc(filp->f_path.dentry->d_inode, cmd, fl); |
655 | } | 655 | } |
656 | 656 | ||
657 | 657 | ||
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 594eb16879ef..345492e78643 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c | |||
@@ -754,8 +754,8 @@ int nfs_updatepage(struct file *file, struct page *page, | |||
754 | nfs_inc_stats(inode, NFSIOS_VFSUPDATEPAGE); | 754 | nfs_inc_stats(inode, NFSIOS_VFSUPDATEPAGE); |
755 | 755 | ||
756 | dprintk("NFS: nfs_updatepage(%s/%s %d@%Ld)\n", | 756 | dprintk("NFS: nfs_updatepage(%s/%s %d@%Ld)\n", |
757 | file->f_dentry->d_parent->d_name.name, | 757 | file->f_path.dentry->d_parent->d_name.name, |
758 | file->f_dentry->d_name.name, count, | 758 | file->f_path.dentry->d_name.name, count, |
759 | (long long)(page_offset(page) +offset)); | 759 | (long long)(page_offset(page) +offset)); |
760 | 760 | ||
761 | /* If we're not using byte range locks, and we know the page | 761 | /* If we're not using byte range locks, and we know the page |