aboutsummaryrefslogtreecommitdiffstats
path: root/fs/file_table.c
diff options
context:
space:
mode:
authorMimi Zohar <zohar@linux.vnet.ibm.com>2017-06-21 21:13:18 -0400
committerMimi Zohar <zohar@linux.vnet.ibm.com>2017-11-08 15:16:36 -0500
commitbb02b186d02f90f693bc573c392df843b024f4ef (patch)
treeb13e88ebb2cc873dd9ad72dc3cf9e3de69ecb32b /fs/file_table.c
parenta7d3d0392a325d630225b7dbccf2558f944114e5 (diff)
ima: call ima_file_free() prior to calling fasync
The file hash is calculated and written out as an xattr after calling fasync(). In order for the file data and metadata to be written out to disk at the same time, this patch calculates the file hash and stores it as an xattr before calling fasync. Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Diffstat (limited to 'fs/file_table.c')
-rw-r--r--fs/file_table.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/file_table.c b/fs/file_table.c
index 61517f57f8ef..49e1f2f1a4cb 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -201,11 +201,11 @@ static void __fput(struct file *file)
201 eventpoll_release(file); 201 eventpoll_release(file);
202 locks_remove_file(file); 202 locks_remove_file(file);
203 203
204 ima_file_free(file);
204 if (unlikely(file->f_flags & FASYNC)) { 205 if (unlikely(file->f_flags & FASYNC)) {
205 if (file->f_op->fasync) 206 if (file->f_op->fasync)
206 file->f_op->fasync(-1, file, 0); 207 file->f_op->fasync(-1, file, 0);
207 } 208 }
208 ima_file_free(file);
209 if (file->f_op->release) 209 if (file->f_op->release)
210 file->f_op->release(inode, file); 210 file->f_op->release(inode, file);
211 security_file_free(file); 211 security_file_free(file);