Commit 9266abe5 authored by J. R. Okajima's avatar J. R. Okajima
Browse files

Merge branch 'aufs5.2/01modular' into aufs5.2.5+/01modular

parents 3710ee29 84f677d7
...@@ -1205,6 +1205,7 @@ static int au_br_mod_files_ro(struct super_block *sb, aufs_bindex_t bindex) ...@@ -1205,6 +1205,7 @@ static int au_br_mod_files_ro(struct super_block *sb, aufs_bindex_t bindex)
unsigned char verbose, writer; unsigned char verbose, writer;
struct file *file, *hf, **array; struct file *file, *hf, **array;
struct au_hfile *hfile; struct au_hfile *hfile;
struct inode *h_inode;
mnt_flags = au_mntflags(sb); mnt_flags = au_mntflags(sb);
verbose = !!au_opt_test(mnt_flags, VERBOSE); verbose = !!au_opt_test(mnt_flags, VERBOSE);
...@@ -1275,7 +1276,10 @@ static int au_br_mod_files_ro(struct super_block *sb, aufs_bindex_t bindex) ...@@ -1275,7 +1276,10 @@ static int au_br_mod_files_ro(struct super_block *sb, aufs_bindex_t bindex)
hf->f_mode &= ~(FMODE_WRITE | FMODE_WRITER); hf->f_mode &= ~(FMODE_WRITE | FMODE_WRITER);
spin_unlock(&hf->f_lock); spin_unlock(&hf->f_lock);
if (writer) { if (writer) {
put_write_access(file_inode(hf)); h_inode = file_inode(hf);
if (hf->f_mode & FMODE_READ)
i_readcount_inc(h_inode);
put_write_access(h_inode);
__mnt_drop_write(hf->f_path.mnt); __mnt_drop_write(hf->f_path.mnt);
} }
} }
......
...@@ -63,15 +63,8 @@ int vfsub_update_h_iattr(struct path *h_path, int *did) ...@@ -63,15 +63,8 @@ int vfsub_update_h_iattr(struct path *h_path, int *did)
struct file *vfsub_dentry_open(struct path *path, int flags) struct file *vfsub_dentry_open(struct path *path, int flags)
{ {
struct file *file; return dentry_open(path, flags /* | __FMODE_NONOTIFY */,
file = dentry_open(path, flags /* | __FMODE_NONOTIFY */,
current_cred()); current_cred());
if (!IS_ERR_OR_NULL(file)
&& (file->f_mode & (FMODE_READ | FMODE_WRITE)) == FMODE_READ)
i_readcount_inc(d_inode(path->dentry));
return file;
} }
struct file *vfsub_filp_open(const char *path, int oflags, int mode) struct file *vfsub_filp_open(const char *path, int oflags, int mode)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment