Skip to content

Commit 9da15eb

Browse files
committed
Merge branch 'aufs5.2/11mmap' into aufs5.3/11mmap
Signed-off-by: J. R. Okajima <[email protected]> # Conflicts: # fs/aufs/branch.c
2 parents 84055d2 + 726c229 commit 9da15eb

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

fs/aufs/branch.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,11 +1277,10 @@ static int au_br_mod_files_ro(struct super_block *sb, aufs_bindex_t bindex)
12771277
spin_unlock(&hf->f_lock);
12781278
if (writer) {
12791279
h_inode = file_inode(hf);
1280+
if (hf->f_mode & FMODE_READ)
1281+
i_readcount_inc(h_inode);
12801282
put_write_access(h_inode);
12811283
__mnt_drop_write(hf->f_path.mnt);
1282-
if ((hf->f_mode & (FMODE_READ | FMODE_WRITE))
1283-
== FMODE_READ)
1284-
i_readcount_inc(h_inode);
12851284
}
12861285
}
12871286

fs/aufs/vfsub.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,8 @@ int vfsub_update_h_iattr(struct path *h_path, int *did)
6363

6464
struct file *vfsub_dentry_open(struct path *path, int flags)
6565
{
66-
struct file *file;
67-
68-
file = dentry_open(path, flags /* | __FMODE_NONOTIFY */,
66+
return dentry_open(path, flags /* | __FMODE_NONOTIFY */,
6967
current_cred());
70-
if (!IS_ERR_OR_NULL(file)
71-
&& (file->f_mode & (FMODE_READ | FMODE_WRITE)) == FMODE_READ)
72-
i_readcount_inc(d_inode(path->dentry));
73-
74-
return file;
7568
}
7669

7770
struct file *vfsub_filp_open(const char *path, int oflags, int mode)

0 commit comments

Comments
 (0)