aboutsummaryrefslogtreecommitdiffstats
path: root/fs/overlayfs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-05-27 20:14:05 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-05-27 20:14:05 -0400
commitd102a56edba7a3f236454716fa09920e66772044 (patch)
treebfed5508d09028bbf180507b21b8ab25c6980eac /fs/overlayfs
parent0121a32201dcc72933fb6019c41661e2f8a02fc5 (diff)
parent3767e255b390d72f9a33c08d9e86c5f21f25860f (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs fixes from Al Viro: "Followups to the parallel lookup work: - update docs - restore killability of the places that used to take ->i_mutex killably now that we have down_write_killable() merged - Additionally, it turns out that I missed a prerequisite for security_d_instantiate() stuff - ->getxattr() wasn't the only thing that could be called before dentry is attached to inode; with smack we needed the same treatment applied to ->setxattr() as well" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: switch ->setxattr() to passing dentry and inode separately switch xattr_handler->set() to passing dentry and inode separately restore killability of old mutex_lock_killable(&inode->i_mutex) users add down_write_killable_nested() update D/f/directory-locking
Diffstat (limited to 'fs/overlayfs')
-rw-r--r--fs/overlayfs/inode.c5
-rw-r--r--fs/overlayfs/overlayfs.h5
-rw-r--r--fs/overlayfs/readdir.c4
3 files changed, 7 insertions, 7 deletions
diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c
index c7b31a03dc9c..0ed7c4012437 100644
--- a/fs/overlayfs/inode.c
+++ b/fs/overlayfs/inode.c
@@ -210,8 +210,9 @@ static bool ovl_is_private_xattr(const char *name)
210 return strncmp(name, OVL_XATTR_PRE_NAME, OVL_XATTR_PRE_LEN) == 0; 210 return strncmp(name, OVL_XATTR_PRE_NAME, OVL_XATTR_PRE_LEN) == 0;
211} 211}
212 212
213int ovl_setxattr(struct dentry *dentry, const char *name, 213int ovl_setxattr(struct dentry *dentry, struct inode *inode,
214 const void *value, size_t size, int flags) 214 const char *name, const void *value,
215 size_t size, int flags)
215{ 216{
216 int err; 217 int err;
217 struct dentry *upperdentry; 218 struct dentry *upperdentry;
diff --git a/fs/overlayfs/overlayfs.h b/fs/overlayfs/overlayfs.h
index 724f5fcb4e24..4bd9b5ba8f42 100644
--- a/fs/overlayfs/overlayfs.h
+++ b/fs/overlayfs/overlayfs.h
@@ -172,8 +172,9 @@ int ovl_check_d_type_supported(struct path *realpath);
172/* inode.c */ 172/* inode.c */
173int ovl_setattr(struct dentry *dentry, struct iattr *attr); 173int ovl_setattr(struct dentry *dentry, struct iattr *attr);
174int ovl_permission(struct inode *inode, int mask); 174int ovl_permission(struct inode *inode, int mask);
175int ovl_setxattr(struct dentry *dentry, const char *name, 175int ovl_setxattr(struct dentry *dentry, struct inode *inode,
176 const void *value, size_t size, int flags); 176 const char *name, const void *value,
177 size_t size, int flags);
177ssize_t ovl_getxattr(struct dentry *dentry, struct inode *inode, 178ssize_t ovl_getxattr(struct dentry *dentry, struct inode *inode,
178 const char *name, void *value, size_t size); 179 const char *name, void *value, size_t size);
179ssize_t ovl_listxattr(struct dentry *dentry, char *list, size_t size); 180ssize_t ovl_listxattr(struct dentry *dentry, char *list, size_t size);
diff --git a/fs/overlayfs/readdir.c b/fs/overlayfs/readdir.c
index d11ae826bcbc..cf37fc76fc9f 100644
--- a/fs/overlayfs/readdir.c
+++ b/fs/overlayfs/readdir.c
@@ -210,9 +210,7 @@ static int ovl_check_whiteouts(struct dentry *dir, struct ovl_readdir_data *rdd)
210 210
211 old_cred = ovl_override_creds(rdd->dentry->d_sb); 211 old_cred = ovl_override_creds(rdd->dentry->d_sb);
212 212
213 inode_lock(dir->d_inode); 213 err = down_write_killable(&dir->d_inode->i_rwsem);
214 err = 0;
215 // XXX: err = mutex_lock_killable(&dir->d_inode->i_mutex);
216 if (!err) { 214 if (!err) {
217 while (rdd->first_maybe_whiteout) { 215 while (rdd->first_maybe_whiteout) {
218 p = rdd->first_maybe_whiteout; 216 p = rdd->first_maybe_whiteout;