Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull final vfs updates from Al Viro: - The ->i_mutex wrappers (with small prereq in lustre) - a fix for too early freeing of symlink bodies on shmem (they need to be RCU-delayed) (-stable fodder) - followup to dedupe stuff merged this cycle * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: vfs: abort dedupe loop if fatal signals are pending make sure that freeing shmem fast symlinks is RCU-delayed wrappers for ->i_mutex access lustre: remove unused declaration
This commit is contained in:
@@ -715,6 +715,31 @@ enum inode_i_mutex_lock_class
|
||||
I_MUTEX_PARENT2,
|
||||
};
|
||||
|
||||
static inline void inode_lock(struct inode *inode)
|
||||
{
|
||||
mutex_lock(&inode->i_mutex);
|
||||
}
|
||||
|
||||
static inline void inode_unlock(struct inode *inode)
|
||||
{
|
||||
mutex_unlock(&inode->i_mutex);
|
||||
}
|
||||
|
||||
static inline int inode_trylock(struct inode *inode)
|
||||
{
|
||||
return mutex_trylock(&inode->i_mutex);
|
||||
}
|
||||
|
||||
static inline int inode_is_locked(struct inode *inode)
|
||||
{
|
||||
return mutex_is_locked(&inode->i_mutex);
|
||||
}
|
||||
|
||||
static inline void inode_lock_nested(struct inode *inode, unsigned subclass)
|
||||
{
|
||||
mutex_lock_nested(&inode->i_mutex, subclass);
|
||||
}
|
||||
|
||||
void lock_two_nondirectories(struct inode *, struct inode*);
|
||||
void unlock_two_nondirectories(struct inode *, struct inode*);
|
||||
|
||||
@@ -3048,8 +3073,8 @@ static inline bool dir_emit_dots(struct file *file, struct dir_context *ctx)
|
||||
}
|
||||
static inline bool dir_relax(struct inode *inode)
|
||||
{
|
||||
mutex_unlock(&inode->i_mutex);
|
||||
mutex_lock(&inode->i_mutex);
|
||||
inode_unlock(inode);
|
||||
inode_lock(inode);
|
||||
return !IS_DEADDIR(inode);
|
||||
}
|
||||
|
||||
|
@@ -15,10 +15,7 @@ struct shmem_inode_info {
|
||||
unsigned int seals; /* shmem seals */
|
||||
unsigned long flags;
|
||||
unsigned long alloced; /* data pages alloced to file */
|
||||
union {
|
||||
unsigned long swapped; /* subtotal assigned to swap */
|
||||
char *symlink; /* unswappable short symlink */
|
||||
};
|
||||
unsigned long swapped; /* subtotal assigned to swap */
|
||||
struct shared_policy policy; /* NUMA memory alloc policy */
|
||||
struct list_head swaplist; /* chain of maybes on swap */
|
||||
struct simple_xattrs xattrs; /* list of xattrs */
|
||||
|
Reference in New Issue
Block a user