diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-26 18:48:49 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-26 20:22:07 -0400 |
commit | 9ec3a646fe09970f801ab15e0f1694060b9f19af (patch) | |
tree | 697058ca7e1671eda180a3ccc62445686fbc1a31 /arch | |
parent | c8b3fd0ce313443731e8fd6d5a541085eb465f99 (diff) | |
parent | 3cab989afd8d8d1bc3d99fef0e7ed87c31e7b647 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull fourth vfs update from Al Viro:
"d_inode() annotations from David Howells (sat in for-next since before
the beginning of merge window) + four assorted fixes"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
RCU pathwalk breakage when running into a symlink overmounting something
fix I_DIO_WAKEUP definition
direct-io: only inc/dec inode->i_dio_count for file systems
fs/9p: fix readdir()
VFS: assorted d_backing_inode() annotations
VFS: fs/inode.c helpers: d_inode() annotations
VFS: fs/cachefiles: d_backing_inode() annotations
VFS: fs library helpers: d_inode() annotations
VFS: assorted weird filesystems: d_inode() annotations
VFS: normal filesystems (and lustre): d_inode() annotations
VFS: security/: d_inode() annotations
VFS: security/: d_backing_inode() annotations
VFS: net/: d_inode() annotations
VFS: net/unix: d_backing_inode() annotations
VFS: kernel/: d_inode() annotations
VFS: audit: d_backing_inode() annotations
VFS: Fix up some ->d_inode accesses in the chelsio driver
VFS: Cachefiles should perform fs modifications on the top layer only
VFS: AF_UNIX sockets should call mknod on the top layer only
Diffstat (limited to 'arch')
-rw-r--r-- | arch/ia64/kernel/perfmon.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/inode.c | 22 | ||||
-rw-r--r-- | arch/s390/hypfs/inode.c | 18 | ||||
-rw-r--r-- | arch/x86/kvm/assigned-dev.c | 2 |
4 files changed, 22 insertions, 22 deletions
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index 5f4243f0acfa..60e02f7747ff 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -2159,7 +2159,7 @@ static const struct file_operations pfm_file_ops = { | |||
2159 | static char *pfmfs_dname(struct dentry *dentry, char *buffer, int buflen) | 2159 | static char *pfmfs_dname(struct dentry *dentry, char *buffer, int buflen) |
2160 | { | 2160 | { |
2161 | return dynamic_dname(dentry, buffer, buflen, "pfm:[%lu]", | 2161 | return dynamic_dname(dentry, buffer, buflen, "pfm:[%lu]", |
2162 | dentry->d_inode->i_ino); | 2162 | d_inode(dentry)->i_ino); |
2163 | } | 2163 | } |
2164 | 2164 | ||
2165 | static const struct dentry_operations pfmfs_dentry_operations = { | 2165 | static const struct dentry_operations pfmfs_dentry_operations = { |
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index 1a3429e1ccb5..1ba6307be4db 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c | |||
@@ -111,7 +111,7 @@ out: | |||
111 | static int | 111 | static int |
112 | spufs_setattr(struct dentry *dentry, struct iattr *attr) | 112 | spufs_setattr(struct dentry *dentry, struct iattr *attr) |
113 | { | 113 | { |
114 | struct inode *inode = dentry->d_inode; | 114 | struct inode *inode = d_inode(dentry); |
115 | 115 | ||
116 | if ((attr->ia_valid & ATTR_SIZE) && | 116 | if ((attr->ia_valid & ATTR_SIZE) && |
117 | (attr->ia_size != inode->i_size)) | 117 | (attr->ia_size != inode->i_size)) |
@@ -163,14 +163,14 @@ static void spufs_prune_dir(struct dentry *dir) | |||
163 | { | 163 | { |
164 | struct dentry *dentry, *tmp; | 164 | struct dentry *dentry, *tmp; |
165 | 165 | ||
166 | mutex_lock(&dir->d_inode->i_mutex); | 166 | mutex_lock(&d_inode(dir)->i_mutex); |
167 | list_for_each_entry_safe(dentry, tmp, &dir->d_subdirs, d_child) { | 167 | list_for_each_entry_safe(dentry, tmp, &dir->d_subdirs, d_child) { |
168 | spin_lock(&dentry->d_lock); | 168 | spin_lock(&dentry->d_lock); |
169 | if (!(d_unhashed(dentry)) && dentry->d_inode) { | 169 | if (!(d_unhashed(dentry)) && d_really_is_positive(dentry)) { |
170 | dget_dlock(dentry); | 170 | dget_dlock(dentry); |
171 | __d_drop(dentry); | 171 | __d_drop(dentry); |
172 | spin_unlock(&dentry->d_lock); | 172 | spin_unlock(&dentry->d_lock); |
173 | simple_unlink(dir->d_inode, dentry); | 173 | simple_unlink(d_inode(dir), dentry); |
174 | /* XXX: what was dcache_lock protecting here? Other | 174 | /* XXX: what was dcache_lock protecting here? Other |
175 | * filesystems (IB, configfs) release dcache_lock | 175 | * filesystems (IB, configfs) release dcache_lock |
176 | * before unlink */ | 176 | * before unlink */ |
@@ -180,7 +180,7 @@ static void spufs_prune_dir(struct dentry *dir) | |||
180 | } | 180 | } |
181 | } | 181 | } |
182 | shrink_dcache_parent(dir); | 182 | shrink_dcache_parent(dir); |
183 | mutex_unlock(&dir->d_inode->i_mutex); | 183 | mutex_unlock(&d_inode(dir)->i_mutex); |
184 | } | 184 | } |
185 | 185 | ||
186 | /* Caller must hold parent->i_mutex */ | 186 | /* Caller must hold parent->i_mutex */ |
@@ -192,7 +192,7 @@ static int spufs_rmdir(struct inode *parent, struct dentry *dir) | |||
192 | d_drop(dir); | 192 | d_drop(dir); |
193 | res = simple_rmdir(parent, dir); | 193 | res = simple_rmdir(parent, dir); |
194 | /* We have to give up the mm_struct */ | 194 | /* We have to give up the mm_struct */ |
195 | spu_forget(SPUFS_I(dir->d_inode)->i_ctx); | 195 | spu_forget(SPUFS_I(d_inode(dir))->i_ctx); |
196 | return res; | 196 | return res; |
197 | } | 197 | } |
198 | 198 | ||
@@ -222,8 +222,8 @@ static int spufs_dir_close(struct inode *inode, struct file *file) | |||
222 | int ret; | 222 | int ret; |
223 | 223 | ||
224 | dir = file->f_path.dentry; | 224 | dir = file->f_path.dentry; |
225 | parent = dir->d_parent->d_inode; | 225 | parent = d_inode(dir->d_parent); |
226 | ctx = SPUFS_I(dir->d_inode)->i_ctx; | 226 | ctx = SPUFS_I(d_inode(dir))->i_ctx; |
227 | 227 | ||
228 | mutex_lock_nested(&parent->i_mutex, I_MUTEX_PARENT); | 228 | mutex_lock_nested(&parent->i_mutex, I_MUTEX_PARENT); |
229 | ret = spufs_rmdir(parent, dir); | 229 | ret = spufs_rmdir(parent, dir); |
@@ -460,7 +460,7 @@ spufs_create_context(struct inode *inode, struct dentry *dentry, | |||
460 | goto out_aff_unlock; | 460 | goto out_aff_unlock; |
461 | 461 | ||
462 | if (affinity) { | 462 | if (affinity) { |
463 | spufs_set_affinity(flags, SPUFS_I(dentry->d_inode)->i_ctx, | 463 | spufs_set_affinity(flags, SPUFS_I(d_inode(dentry))->i_ctx, |
464 | neighbor); | 464 | neighbor); |
465 | if (neighbor) | 465 | if (neighbor) |
466 | put_spu_context(neighbor); | 466 | put_spu_context(neighbor); |
@@ -504,7 +504,7 @@ spufs_mkgang(struct inode *dir, struct dentry *dentry, umode_t mode) | |||
504 | 504 | ||
505 | d_instantiate(dentry, inode); | 505 | d_instantiate(dentry, inode); |
506 | inc_nlink(dir); | 506 | inc_nlink(dir); |
507 | inc_nlink(dentry->d_inode); | 507 | inc_nlink(d_inode(dentry)); |
508 | return ret; | 508 | return ret; |
509 | 509 | ||
510 | out_iput: | 510 | out_iput: |
@@ -561,7 +561,7 @@ static struct file_system_type spufs_type; | |||
561 | long spufs_create(struct path *path, struct dentry *dentry, | 561 | long spufs_create(struct path *path, struct dentry *dentry, |
562 | unsigned int flags, umode_t mode, struct file *filp) | 562 | unsigned int flags, umode_t mode, struct file *filp) |
563 | { | 563 | { |
564 | struct inode *dir = path->dentry->d_inode; | 564 | struct inode *dir = d_inode(path->dentry); |
565 | int ret; | 565 | int ret; |
566 | 566 | ||
567 | /* check if we are on spufs */ | 567 | /* check if we are on spufs */ |
diff --git a/arch/s390/hypfs/inode.c b/arch/s390/hypfs/inode.c index 3f5c799b7fb5..d3f896a35b98 100644 --- a/arch/s390/hypfs/inode.c +++ b/arch/s390/hypfs/inode.c | |||
@@ -48,7 +48,7 @@ static struct dentry *hypfs_last_dentry; | |||
48 | static void hypfs_update_update(struct super_block *sb) | 48 | static void hypfs_update_update(struct super_block *sb) |
49 | { | 49 | { |
50 | struct hypfs_sb_info *sb_info = sb->s_fs_info; | 50 | struct hypfs_sb_info *sb_info = sb->s_fs_info; |
51 | struct inode *inode = sb_info->update_file->d_inode; | 51 | struct inode *inode = d_inode(sb_info->update_file); |
52 | 52 | ||
53 | sb_info->last_update = get_seconds(); | 53 | sb_info->last_update = get_seconds(); |
54 | inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; | 54 | inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; |
@@ -64,7 +64,7 @@ static void hypfs_add_dentry(struct dentry *dentry) | |||
64 | 64 | ||
65 | static inline int hypfs_positive(struct dentry *dentry) | 65 | static inline int hypfs_positive(struct dentry *dentry) |
66 | { | 66 | { |
67 | return dentry->d_inode && !d_unhashed(dentry); | 67 | return d_really_is_positive(dentry) && !d_unhashed(dentry); |
68 | } | 68 | } |
69 | 69 | ||
70 | static void hypfs_remove(struct dentry *dentry) | 70 | static void hypfs_remove(struct dentry *dentry) |
@@ -72,16 +72,16 @@ static void hypfs_remove(struct dentry *dentry) | |||
72 | struct dentry *parent; | 72 | struct dentry *parent; |
73 | 73 | ||
74 | parent = dentry->d_parent; | 74 | parent = dentry->d_parent; |
75 | mutex_lock(&parent->d_inode->i_mutex); | 75 | mutex_lock(&d_inode(parent)->i_mutex); |
76 | if (hypfs_positive(dentry)) { | 76 | if (hypfs_positive(dentry)) { |
77 | if (d_is_dir(dentry)) | 77 | if (d_is_dir(dentry)) |
78 | simple_rmdir(parent->d_inode, dentry); | 78 | simple_rmdir(d_inode(parent), dentry); |
79 | else | 79 | else |
80 | simple_unlink(parent->d_inode, dentry); | 80 | simple_unlink(d_inode(parent), dentry); |
81 | } | 81 | } |
82 | d_delete(dentry); | 82 | d_delete(dentry); |
83 | dput(dentry); | 83 | dput(dentry); |
84 | mutex_unlock(&parent->d_inode->i_mutex); | 84 | mutex_unlock(&d_inode(parent)->i_mutex); |
85 | } | 85 | } |
86 | 86 | ||
87 | static void hypfs_delete_tree(struct dentry *root) | 87 | static void hypfs_delete_tree(struct dentry *root) |
@@ -336,7 +336,7 @@ static struct dentry *hypfs_create_file(struct dentry *parent, const char *name, | |||
336 | struct dentry *dentry; | 336 | struct dentry *dentry; |
337 | struct inode *inode; | 337 | struct inode *inode; |
338 | 338 | ||
339 | mutex_lock(&parent->d_inode->i_mutex); | 339 | mutex_lock(&d_inode(parent)->i_mutex); |
340 | dentry = lookup_one_len(name, parent, strlen(name)); | 340 | dentry = lookup_one_len(name, parent, strlen(name)); |
341 | if (IS_ERR(dentry)) { | 341 | if (IS_ERR(dentry)) { |
342 | dentry = ERR_PTR(-ENOMEM); | 342 | dentry = ERR_PTR(-ENOMEM); |
@@ -357,14 +357,14 @@ static struct dentry *hypfs_create_file(struct dentry *parent, const char *name, | |||
357 | } else if (S_ISDIR(mode)) { | 357 | } else if (S_ISDIR(mode)) { |
358 | inode->i_op = &simple_dir_inode_operations; | 358 | inode->i_op = &simple_dir_inode_operations; |
359 | inode->i_fop = &simple_dir_operations; | 359 | inode->i_fop = &simple_dir_operations; |
360 | inc_nlink(parent->d_inode); | 360 | inc_nlink(d_inode(parent)); |
361 | } else | 361 | } else |
362 | BUG(); | 362 | BUG(); |
363 | inode->i_private = data; | 363 | inode->i_private = data; |
364 | d_instantiate(dentry, inode); | 364 | d_instantiate(dentry, inode); |
365 | dget(dentry); | 365 | dget(dentry); |
366 | fail: | 366 | fail: |
367 | mutex_unlock(&parent->d_inode->i_mutex); | 367 | mutex_unlock(&d_inode(parent)->i_mutex); |
368 | return dentry; | 368 | return dentry; |
369 | } | 369 | } |
370 | 370 | ||
diff --git a/arch/x86/kvm/assigned-dev.c b/arch/x86/kvm/assigned-dev.c index 6eb5c20ee373..d090ecf08809 100644 --- a/arch/x86/kvm/assigned-dev.c +++ b/arch/x86/kvm/assigned-dev.c | |||
@@ -666,7 +666,7 @@ static int probe_sysfs_permissions(struct pci_dev *dev) | |||
666 | if (r) | 666 | if (r) |
667 | return r; | 667 | return r; |
668 | 668 | ||
669 | inode = path.dentry->d_inode; | 669 | inode = d_backing_inode(path.dentry); |
670 | 670 | ||
671 | r = inode_permission(inode, MAY_READ | MAY_WRITE | MAY_ACCESS); | 671 | r = inode_permission(inode, MAY_READ | MAY_WRITE | MAY_ACCESS); |
672 | path_put(&path); | 672 | path_put(&path); |