X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=fs%2Ffile_table.c;h=b98404b5438385dc803498ba5e0c710a7244ed60;hb=c85a26189660e1cfd1f50989468313c544487950;hp=17a55b81be2da6bd73eba44ab71f14e8827e6391;hpb=0552f879d45cecc35d8e372a591fc5ed863bca58;p=safe%2Fjmp%2Flinux-2.6 diff --git a/fs/file_table.c b/fs/file_table.c index 17a55b8..b98404b 100644 --- a/fs/file_table.c +++ b/fs/file_table.c @@ -186,14 +186,13 @@ struct file *alloc_file(struct path *path, fmode_t mode, * that we can do debugging checks at __fput() */ if ((mode & FMODE_WRITE) && !special_file(path->dentry->d_inode->i_mode)) { - int error = 0; file_take_write(file); - error = mnt_clone_write(path->mnt); - WARN_ON(error); + WARN_ON(mnt_clone_write(path->mnt)); } ima_counts_get(file); return file; } +EXPORT_SYMBOL(alloc_file); void fput(struct file *file) { @@ -254,6 +253,7 @@ void __fput(struct file *file) if (file->f_op && file->f_op->release) file->f_op->release(inode, file); security_file_free(file); + ima_file_free(file); if (unlikely(S_ISCHR(inode->i_mode) && inode->i_cdev != NULL)) cdev_put(inode->i_cdev); fops_put(file->f_op);