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/nfsd/fault_inject.c | |
parent | 57eccb830f1cc93d4b506ba306d8dfa685e0c88f (diff) |
new helper: file_inode(file)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/nfsd/fault_inject.c')
-rw-r--r-- | fs/nfsd/fault_inject.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfsd/fault_inject.c b/fs/nfsd/fault_inject.c index e761ee95617f..497584c70366 100644 --- a/fs/nfsd/fault_inject.c +++ b/fs/nfsd/fault_inject.c | |||
@@ -101,7 +101,7 @@ static ssize_t fault_inject_read(struct file *file, char __user *buf, | |||
101 | loff_t pos = *ppos; | 101 | loff_t pos = *ppos; |
102 | 102 | ||
103 | if (!pos) | 103 | if (!pos) |
104 | nfsd_inject_get(file->f_dentry->d_inode->i_private, &val); | 104 | nfsd_inject_get(file_inode(file)->i_private, &val); |
105 | size = scnprintf(read_buf, sizeof(read_buf), "%llu\n", val); | 105 | size = scnprintf(read_buf, sizeof(read_buf), "%llu\n", val); |
106 | 106 | ||
107 | if (pos < 0) | 107 | if (pos < 0) |
@@ -133,10 +133,10 @@ static ssize_t fault_inject_write(struct file *file, const char __user *buf, | |||
133 | 133 | ||
134 | size = rpc_pton(net, write_buf, size, (struct sockaddr *)&sa, sizeof(sa)); | 134 | size = rpc_pton(net, write_buf, size, (struct sockaddr *)&sa, sizeof(sa)); |
135 | if (size > 0) | 135 | if (size > 0) |
136 | nfsd_inject_set_client(file->f_dentry->d_inode->i_private, &sa, size); | 136 | nfsd_inject_set_client(file_inode(file)->i_private, &sa, size); |
137 | else { | 137 | else { |
138 | val = simple_strtoll(write_buf, NULL, 0); | 138 | val = simple_strtoll(write_buf, NULL, 0); |
139 | nfsd_inject_set(file->f_dentry->d_inode->i_private, val); | 139 | nfsd_inject_set(file_inode(file)->i_private, val); |
140 | } | 140 | } |
141 | return len; /* on success, claim we got the whole input */ | 141 | return len; /* on success, claim we got the whole input */ |
142 | } | 142 | } |