Commit 200d30c0 authored by J. R. Okajima's avatar J. R. Okajima
Browse files

Merge branch 'aufs5.x-rcN/30stdalone' into aufs5.x-rcN/39public

parents 7883b02c b4cfdfca
...@@ -1218,6 +1218,7 @@ static int au_br_mod_files_ro(struct super_block *sb, aufs_bindex_t bindex) ...@@ -1218,6 +1218,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);
...@@ -1288,8 +1289,12 @@ static int au_br_mod_files_ro(struct super_block *sb, aufs_bindex_t bindex) ...@@ -1288,8 +1289,12 @@ 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);
put_write_access(h_inode);
__mnt_drop_write(hf->f_path.mnt); __mnt_drop_write(hf->f_path.mnt);
if ((hf->f_mode & (FMODE_READ | FMODE_WRITE))
== FMODE_READ)
i_readcount_inc(h_inode);
} }
} }
......
...@@ -640,9 +640,7 @@ out: ...@@ -640,9 +640,7 @@ out:
static void au_pin_hdir_set_owner(struct au_pin *p, struct task_struct *task) static void au_pin_hdir_set_owner(struct au_pin *p, struct task_struct *task)
{ {
#if !defined(CONFIG_RWSEM_GENERIC_SPINLOCK) && defined(CONFIG_RWSEM_SPIN_ON_OWNER) atomic_long_set(&p->hdir->hi_inode->i_rwsem.owner, (long)task);
p->hdir->hi_inode->i_rwsem.owner = task;
#endif
} }
void au_pin_hdir_acquire_nest(struct au_pin *p) void au_pin_hdir_acquire_nest(struct au_pin *p)
......
...@@ -254,7 +254,11 @@ enum { ...@@ -254,7 +254,11 @@ enum {
/* borrowed from linux/include/linux/kernel.h */ /* borrowed from linux/include/linux/kernel.h */
#ifndef ALIGN #ifndef ALIGN
#ifdef _GNU_SOURCE
#define ALIGN(x, a) __ALIGN_MASK(x, (typeof(x))(a)-1) #define ALIGN(x, a) __ALIGN_MASK(x, (typeof(x))(a)-1)
#else
#define ALIGN(x, a) (((x) + (a) - 1) & ~((a) - 1))
#endif
#define __ALIGN_MASK(x, mask) (((x)+(mask))&~(mask)) #define __ALIGN_MASK(x, mask) (((x)+(mask))&~(mask))
#endif #endif
......
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