diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-01-23 17:07:38 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-22 23:31:31 -0500 |
commit | 496ad9aa8ef448058e36ca7a787c61f2e63f0f54 (patch) | |
tree | 8f4abde793cd7db5bb8fde6d27ebcacd0e54379a /fs/nfs | |
parent | 57eccb830f1cc93d4b506ba306d8dfa685e0c88f (diff) |
new helper: file_inode(file)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/dir.c | 8 | ||||
-rw-r--r-- | fs/nfs/file.c | 2 | ||||
-rw-r--r-- | fs/nfs/idmap.c | 2 | ||||
-rw-r--r-- | fs/nfs/inode.c | 4 | ||||
-rw-r--r-- | fs/nfs/nfs3proc.c | 2 | ||||
-rw-r--r-- | fs/nfs/nfs4file.c | 2 | ||||
-rw-r--r-- | fs/nfs/proc.c | 2 |
7 files changed, 11 insertions, 11 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 1b2d7eb93796..a8bd28cde7e2 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
@@ -281,7 +281,7 @@ int nfs_readdir_search_for_cookie(struct nfs_cache_array *array, nfs_readdir_des | |||
281 | 281 | ||
282 | for (i = 0; i < array->size; i++) { | 282 | for (i = 0; i < array->size; i++) { |
283 | if (array->array[i].cookie == *desc->dir_cookie) { | 283 | if (array->array[i].cookie == *desc->dir_cookie) { |
284 | struct nfs_inode *nfsi = NFS_I(desc->file->f_path.dentry->d_inode); | 284 | struct nfs_inode *nfsi = NFS_I(file_inode(desc->file)); |
285 | struct nfs_open_dir_context *ctx = desc->file->private_data; | 285 | struct nfs_open_dir_context *ctx = desc->file->private_data; |
286 | 286 | ||
287 | new_pos = desc->current_index + i; | 287 | new_pos = desc->current_index + i; |
@@ -629,7 +629,7 @@ out: | |||
629 | static | 629 | static |
630 | int nfs_readdir_filler(nfs_readdir_descriptor_t *desc, struct page* page) | 630 | int nfs_readdir_filler(nfs_readdir_descriptor_t *desc, struct page* page) |
631 | { | 631 | { |
632 | struct inode *inode = desc->file->f_path.dentry->d_inode; | 632 | struct inode *inode = file_inode(desc->file); |
633 | int ret; | 633 | int ret; |
634 | 634 | ||
635 | ret = nfs_readdir_xdr_to_array(desc, page, inode); | 635 | ret = nfs_readdir_xdr_to_array(desc, page, inode); |
@@ -660,7 +660,7 @@ void cache_page_release(nfs_readdir_descriptor_t *desc) | |||
660 | static | 660 | static |
661 | struct page *get_cache_page(nfs_readdir_descriptor_t *desc) | 661 | struct page *get_cache_page(nfs_readdir_descriptor_t *desc) |
662 | { | 662 | { |
663 | return read_cache_page(desc->file->f_path.dentry->d_inode->i_mapping, | 663 | return read_cache_page(file_inode(desc->file)->i_mapping, |
664 | desc->page_index, (filler_t *)nfs_readdir_filler, desc); | 664 | desc->page_index, (filler_t *)nfs_readdir_filler, desc); |
665 | } | 665 | } |
666 | 666 | ||
@@ -764,7 +764,7 @@ int uncached_readdir(nfs_readdir_descriptor_t *desc, void *dirent, | |||
764 | { | 764 | { |
765 | struct page *page = NULL; | 765 | struct page *page = NULL; |
766 | int status; | 766 | int status; |
767 | struct inode *inode = desc->file->f_path.dentry->d_inode; | 767 | struct inode *inode = file_inode(desc->file); |
768 | struct nfs_open_dir_context *ctx = desc->file->private_data; | 768 | struct nfs_open_dir_context *ctx = desc->file->private_data; |
769 | 769 | ||
770 | dfprintk(DIRCACHE, "NFS: uncached_readdir() searching for cookie %Lu\n", | 770 | dfprintk(DIRCACHE, "NFS: uncached_readdir() searching for cookie %Lu\n", |
diff --git a/fs/nfs/file.c b/fs/nfs/file.c index 3c2b893665ba..29f4a48a0ee6 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c | |||
@@ -292,7 +292,7 @@ static int | |||
292 | nfs_file_fsync(struct file *file, loff_t start, loff_t end, int datasync) | 292 | nfs_file_fsync(struct file *file, loff_t start, loff_t end, int datasync) |
293 | { | 293 | { |
294 | int ret; | 294 | int ret; |
295 | struct inode *inode = file->f_path.dentry->d_inode; | 295 | struct inode *inode = file_inode(file); |
296 | 296 | ||
297 | do { | 297 | do { |
298 | ret = filemap_write_and_wait_range(inode->i_mapping, start, end); | 298 | ret = filemap_write_and_wait_range(inode->i_mapping, start, end); |
diff --git a/fs/nfs/idmap.c b/fs/nfs/idmap.c index bc3968fa81e5..2ad8deaf7dbf 100644 --- a/fs/nfs/idmap.c +++ b/fs/nfs/idmap.c | |||
@@ -764,7 +764,7 @@ out: | |||
764 | static ssize_t | 764 | static ssize_t |
765 | idmap_pipe_downcall(struct file *filp, const char __user *src, size_t mlen) | 765 | idmap_pipe_downcall(struct file *filp, const char __user *src, size_t mlen) |
766 | { | 766 | { |
767 | struct rpc_inode *rpci = RPC_I(filp->f_path.dentry->d_inode); | 767 | struct rpc_inode *rpci = RPC_I(file_inode(filp)); |
768 | struct idmap *idmap = (struct idmap *)rpci->private; | 768 | struct idmap *idmap = (struct idmap *)rpci->private; |
769 | struct key_construction *cons; | 769 | struct key_construction *cons; |
770 | struct idmap_msg im; | 770 | struct idmap_msg im; |
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index ebeb94ce1b0b..548ae3113005 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -714,7 +714,7 @@ EXPORT_SYMBOL_GPL(put_nfs_open_context); | |||
714 | */ | 714 | */ |
715 | void nfs_file_set_open_context(struct file *filp, struct nfs_open_context *ctx) | 715 | void nfs_file_set_open_context(struct file *filp, struct nfs_open_context *ctx) |
716 | { | 716 | { |
717 | struct inode *inode = filp->f_path.dentry->d_inode; | 717 | struct inode *inode = file_inode(filp); |
718 | struct nfs_inode *nfsi = NFS_I(inode); | 718 | struct nfs_inode *nfsi = NFS_I(inode); |
719 | 719 | ||
720 | filp->private_data = get_nfs_open_context(ctx); | 720 | filp->private_data = get_nfs_open_context(ctx); |
@@ -747,7 +747,7 @@ struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_c | |||
747 | 747 | ||
748 | static void nfs_file_clear_open_context(struct file *filp) | 748 | static void nfs_file_clear_open_context(struct file *filp) |
749 | { | 749 | { |
750 | struct inode *inode = filp->f_path.dentry->d_inode; | 750 | struct inode *inode = file_inode(filp); |
751 | struct nfs_open_context *ctx = nfs_file_open_context(filp); | 751 | struct nfs_open_context *ctx = nfs_file_open_context(filp); |
752 | 752 | ||
753 | if (ctx) { | 753 | if (ctx) { |
diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c index 70efb63b1e42..43ea96ced28c 100644 --- a/fs/nfs/nfs3proc.c +++ b/fs/nfs/nfs3proc.c | |||
@@ -872,7 +872,7 @@ static void nfs3_proc_commit_setup(struct nfs_commit_data *data, struct rpc_mess | |||
872 | static int | 872 | static int |
873 | nfs3_proc_lock(struct file *filp, int cmd, struct file_lock *fl) | 873 | nfs3_proc_lock(struct file *filp, int cmd, struct file_lock *fl) |
874 | { | 874 | { |
875 | struct inode *inode = filp->f_path.dentry->d_inode; | 875 | struct inode *inode = file_inode(filp); |
876 | 876 | ||
877 | return nlmclnt_proc(NFS_SERVER(inode)->nlm_host, cmd, fl); | 877 | return nlmclnt_proc(NFS_SERVER(inode)->nlm_host, cmd, fl); |
878 | } | 878 | } |
diff --git a/fs/nfs/nfs4file.c b/fs/nfs/nfs4file.c index 08ddcccb8887..13e6bb3e3fe5 100644 --- a/fs/nfs/nfs4file.c +++ b/fs/nfs/nfs4file.c | |||
@@ -94,7 +94,7 @@ static int | |||
94 | nfs4_file_fsync(struct file *file, loff_t start, loff_t end, int datasync) | 94 | nfs4_file_fsync(struct file *file, loff_t start, loff_t end, int datasync) |
95 | { | 95 | { |
96 | int ret; | 96 | int ret; |
97 | struct inode *inode = file->f_path.dentry->d_inode; | 97 | struct inode *inode = file_inode(file); |
98 | 98 | ||
99 | do { | 99 | do { |
100 | ret = filemap_write_and_wait_range(inode->i_mapping, start, end); | 100 | ret = filemap_write_and_wait_range(inode->i_mapping, start, end); |
diff --git a/fs/nfs/proc.c b/fs/nfs/proc.c index f084dac948e1..fc8de9016acf 100644 --- a/fs/nfs/proc.c +++ b/fs/nfs/proc.c | |||
@@ -662,7 +662,7 @@ nfs_proc_commit_setup(struct nfs_commit_data *data, struct rpc_message *msg) | |||
662 | static int | 662 | static int |
663 | nfs_proc_lock(struct file *filp, int cmd, struct file_lock *fl) | 663 | nfs_proc_lock(struct file *filp, int cmd, struct file_lock *fl) |
664 | { | 664 | { |
665 | struct inode *inode = filp->f_path.dentry->d_inode; | 665 | struct inode *inode = file_inode(filp); |
666 | 666 | ||
667 | return nlmclnt_proc(NFS_SERVER(inode)->nlm_host, cmd, fl); | 667 | return nlmclnt_proc(NFS_SERVER(inode)->nlm_host, cmd, fl); |
668 | } | 668 | } |