aboutsummaryrefslogtreecommitdiffstats
path: root/fs/file_table.c
diff options
context:
space:
mode:
authorRoland Dreier <rdreier@cisco.com>2009-12-16 15:48:44 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2009-12-22 12:27:33 -0500
commit385e3ed4f0b81dd0b0b214050a30d352a71b95f7 (patch)
treee52388a091a36f29a6a0c1c442914cdc51eee1cc /fs/file_table.c
parentf7b84a6ba7eaeba4e1df8feddca1473a7db369a5 (diff)
alloc_file(): simplify handling of mnt_clone_write() errors
When alloc_file() and init_file() were combined, the error handling of mnt_clone_write() was taken into alloc_file() in a somewhat obfuscated way. Since we don't use the error code for anything except warning, we might as well warn directly without an extra variable. Signed-off-by: Roland Dreier <rolandd@cisco.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/file_table.c')
-rw-r--r--fs/file_table.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/file_table.c b/fs/file_table.c
index 0afacf654398..69652c5bd5f0 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -186,10 +186,8 @@ struct file *alloc_file(struct path *path, fmode_t mode,
186 * that we can do debugging checks at __fput() 186 * that we can do debugging checks at __fput()
187 */ 187 */
188 if ((mode & FMODE_WRITE) && !special_file(path->dentry->d_inode->i_mode)) { 188 if ((mode & FMODE_WRITE) && !special_file(path->dentry->d_inode->i_mode)) {
189 int error = 0;
190 file_take_write(file); 189 file_take_write(file);
191 error = mnt_clone_write(path->mnt); 190 WARN_ON(mnt_clone_write(path->mnt));
192 WARN_ON(error);
193 } 191 }
194 ima_counts_get(file); 192 ima_counts_get(file);
195 return file; 193 return file;