Commit 1d26f910 authored by J. R. Okajima's avatar J. R. Okajima
Browse files

aufs: for v5.3-rc1, maintain i_readcount



By the commit,
	387e3746d01c 2019-06-19 locks: eliminate false positive
		conflicts for write lease
inode->i_readcount becomes common to CONFIG_IMA and CONFIG_FILE_LOCKING.
In aufs branch management, eg. re-setting the branch attribute RW to RO,
aufs has to maintain i_readcount too.
Signed-off-by: default avatarJ. R. Okajima <hooanon05g@gmail.com>
parent f69f1c42
......@@ -1205,6 +1205,7 @@ static int au_br_mod_files_ro(struct super_block *sb, aufs_bindex_t bindex)
unsigned char verbose, writer;
struct file *file, *hf, **array;
struct au_hfile *hfile;
struct inode *h_inode;
mnt_flags = au_mntflags(sb);
verbose = !!au_opt_test(mnt_flags, VERBOSE);
......@@ -1275,8 +1276,12 @@ static int au_br_mod_files_ro(struct super_block *sb, aufs_bindex_t bindex)
hf->f_mode &= ~(FMODE_WRITE | FMODE_WRITER);
spin_unlock(&hf->f_lock);
if (writer) {
put_write_access(file_inode(hf));
h_inode = file_inode(hf);
put_write_access(h_inode);
__mnt_drop_write(hf->f_path.mnt);
if ((hf->f_mode & (FMODE_READ | FMODE_WRITE))
== FMODE_READ)
i_readcount_inc(h_inode);
}
}
......
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