Merge branch 'akpm' (patches from Andrew)
[sfrench/cifs-2.6.git] / fs / open.c
index e62b1db06638910d2401c9d685400cfbd506ae99..6cd48a61cda3b969c0717c30c8bed879efa3d8cc 100644 (file)
--- a/fs/open.c
+++ b/fs/open.c
@@ -775,9 +775,8 @@ static int do_dentry_open(struct file *f,
        path_get(&f->f_path);
        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);
+       f->f_sb_err = file_sample_sb_err(f);
 
        if (unlikely(f->f_flags & O_PATH)) {
                f->f_mode = FMODE_PATH | FMODE_OPENED;