]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/open.c
Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[karo-tx-linux.git] / fs / open.c
index 3fe0c4aa7d27811c49cacc8880b3b41269361d74..35bb784763a4fde35558b10d8538cb9617a7c728 100644 (file)
--- a/fs/open.c
+++ b/fs/open.c
@@ -707,6 +707,9 @@ static int do_dentry_open(struct file *f,
        f->f_inode = inode;
        f->f_mapping = inode->i_mapping;
 
+       /* Ensure that we skip any errors that predate opening of the file */
+       f->f_wb_err = filemap_sample_wb_err(f->f_mapping);
+
        if (unlikely(f->f_flags & O_PATH)) {
                f->f_mode = FMODE_PATH;
                f->f_op = &empty_fops;