aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-04-26 18:48:49 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-26 20:22:07 -0400
commit9ec3a646fe09970f801ab15e0f1694060b9f19af (patch)
tree697058ca7e1671eda180a3ccc62445686fbc1a31 /mm
parentc8b3fd0ce313443731e8fd6d5a541085eb465f99 (diff)
parent3cab989afd8d8d1bc3d99fef0e7ed87c31e7b647 (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 'mm')
-rw-r--r--mm/shmem.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/mm/shmem.c b/mm/shmem.c
index 1ea2400b5245..de981370fbc5 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -544,7 +544,7 @@ EXPORT_SYMBOL_GPL(shmem_truncate_range);
544 544
545static int shmem_setattr(struct dentry *dentry, struct iattr *attr) 545static int shmem_setattr(struct dentry *dentry, struct iattr *attr)
546{ 546{
547 struct inode *inode = dentry->d_inode; 547 struct inode *inode = d_inode(dentry);
548 struct shmem_inode_info *info = SHMEM_I(inode); 548 struct shmem_inode_info *info = SHMEM_I(inode);
549 int error; 549 int error;
550 550
@@ -2274,7 +2274,7 @@ static int shmem_create(struct inode *dir, struct dentry *dentry, umode_t mode,
2274 */ 2274 */
2275static int shmem_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry) 2275static int shmem_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry)
2276{ 2276{
2277 struct inode *inode = old_dentry->d_inode; 2277 struct inode *inode = d_inode(old_dentry);
2278 int ret; 2278 int ret;
2279 2279
2280 /* 2280 /*
@@ -2298,7 +2298,7 @@ out:
2298 2298
2299static int shmem_unlink(struct inode *dir, struct dentry *dentry) 2299static int shmem_unlink(struct inode *dir, struct dentry *dentry)
2300{ 2300{
2301 struct inode *inode = dentry->d_inode; 2301 struct inode *inode = d_inode(dentry);
2302 2302
2303 if (inode->i_nlink > 1 && !S_ISDIR(inode->i_mode)) 2303 if (inode->i_nlink > 1 && !S_ISDIR(inode->i_mode))
2304 shmem_free_inode(inode->i_sb); 2304 shmem_free_inode(inode->i_sb);
@@ -2315,7 +2315,7 @@ static int shmem_rmdir(struct inode *dir, struct dentry *dentry)
2315 if (!simple_empty(dentry)) 2315 if (!simple_empty(dentry))
2316 return -ENOTEMPTY; 2316 return -ENOTEMPTY;
2317 2317
2318 drop_nlink(dentry->d_inode); 2318 drop_nlink(d_inode(dentry));
2319 drop_nlink(dir); 2319 drop_nlink(dir);
2320 return shmem_unlink(dir, dentry); 2320 return shmem_unlink(dir, dentry);
2321} 2321}
@@ -2336,8 +2336,8 @@ static int shmem_exchange(struct inode *old_dir, struct dentry *old_dentry, stru
2336 } 2336 }
2337 old_dir->i_ctime = old_dir->i_mtime = 2337 old_dir->i_ctime = old_dir->i_mtime =
2338 new_dir->i_ctime = new_dir->i_mtime = 2338 new_dir->i_ctime = new_dir->i_mtime =
2339 old_dentry->d_inode->i_ctime = 2339 d_inode(old_dentry)->i_ctime =
2340 new_dentry->d_inode->i_ctime = CURRENT_TIME; 2340 d_inode(new_dentry)->i_ctime = CURRENT_TIME;
2341 2341
2342 return 0; 2342 return 0;
2343} 2343}
@@ -2376,7 +2376,7 @@ static int shmem_whiteout(struct inode *old_dir, struct dentry *old_dentry)
2376 */ 2376 */
2377static int shmem_rename2(struct inode *old_dir, struct dentry *old_dentry, struct inode *new_dir, struct dentry *new_dentry, unsigned int flags) 2377static int shmem_rename2(struct inode *old_dir, struct dentry *old_dentry, struct inode *new_dir, struct dentry *new_dentry, unsigned int flags)
2378{ 2378{
2379 struct inode *inode = old_dentry->d_inode; 2379 struct inode *inode = d_inode(old_dentry);
2380 int they_are_dirs = S_ISDIR(inode->i_mode); 2380 int they_are_dirs = S_ISDIR(inode->i_mode);
2381 2381
2382 if (flags & ~(RENAME_NOREPLACE | RENAME_EXCHANGE | RENAME_WHITEOUT)) 2382 if (flags & ~(RENAME_NOREPLACE | RENAME_EXCHANGE | RENAME_WHITEOUT))
@@ -2396,10 +2396,10 @@ static int shmem_rename2(struct inode *old_dir, struct dentry *old_dentry, struc
2396 return error; 2396 return error;
2397 } 2397 }
2398 2398
2399 if (new_dentry->d_inode) { 2399 if (d_really_is_positive(new_dentry)) {
2400 (void) shmem_unlink(new_dir, new_dentry); 2400 (void) shmem_unlink(new_dir, new_dentry);
2401 if (they_are_dirs) { 2401 if (they_are_dirs) {
2402 drop_nlink(new_dentry->d_inode); 2402 drop_nlink(d_inode(new_dentry));
2403 drop_nlink(old_dir); 2403 drop_nlink(old_dir);
2404 } 2404 }
2405 } else if (they_are_dirs) { 2405 } else if (they_are_dirs) {
@@ -2476,14 +2476,14 @@ static int shmem_symlink(struct inode *dir, struct dentry *dentry, const char *s
2476 2476
2477static void *shmem_follow_short_symlink(struct dentry *dentry, struct nameidata *nd) 2477static void *shmem_follow_short_symlink(struct dentry *dentry, struct nameidata *nd)
2478{ 2478{
2479 nd_set_link(nd, SHMEM_I(dentry->d_inode)->symlink); 2479 nd_set_link(nd, SHMEM_I(d_inode(dentry))->symlink);
2480 return NULL; 2480 return NULL;
2481} 2481}
2482 2482
2483static void *shmem_follow_link(struct dentry *dentry, struct nameidata *nd) 2483static void *shmem_follow_link(struct dentry *dentry, struct nameidata *nd)
2484{ 2484{
2485 struct page *page = NULL; 2485 struct page *page = NULL;
2486 int error = shmem_getpage(dentry->d_inode, 0, &page, SGP_READ, NULL); 2486 int error = shmem_getpage(d_inode(dentry), 0, &page, SGP_READ, NULL);
2487 nd_set_link(nd, error ? ERR_PTR(error) : kmap(page)); 2487 nd_set_link(nd, error ? ERR_PTR(error) : kmap(page));
2488 if (page) 2488 if (page)
2489 unlock_page(page); 2489 unlock_page(page);
@@ -2574,7 +2574,7 @@ static int shmem_xattr_validate(const char *name)
2574static ssize_t shmem_getxattr(struct dentry *dentry, const char *name, 2574static ssize_t shmem_getxattr(struct dentry *dentry, const char *name,
2575 void *buffer, size_t size) 2575 void *buffer, size_t size)
2576{ 2576{
2577 struct shmem_inode_info *info = SHMEM_I(dentry->d_inode); 2577 struct shmem_inode_info *info = SHMEM_I(d_inode(dentry));
2578 int err; 2578 int err;
2579 2579
2580 /* 2580 /*
@@ -2595,7 +2595,7 @@ static ssize_t shmem_getxattr(struct dentry *dentry, const char *name,
2595static int shmem_setxattr(struct dentry *dentry, const char *name, 2595static int shmem_setxattr(struct dentry *dentry, const char *name,
2596 const void *value, size_t size, int flags) 2596 const void *value, size_t size, int flags)
2597{ 2597{
2598 struct shmem_inode_info *info = SHMEM_I(dentry->d_inode); 2598 struct shmem_inode_info *info = SHMEM_I(d_inode(dentry));
2599 int err; 2599 int err;
2600 2600
2601 /* 2601 /*
@@ -2615,7 +2615,7 @@ static int shmem_setxattr(struct dentry *dentry, const char *name,
2615 2615
2616static int shmem_removexattr(struct dentry *dentry, const char *name) 2616static int shmem_removexattr(struct dentry *dentry, const char *name)
2617{ 2617{
2618 struct shmem_inode_info *info = SHMEM_I(dentry->d_inode); 2618 struct shmem_inode_info *info = SHMEM_I(d_inode(dentry));
2619 int err; 2619 int err;
2620 2620
2621 /* 2621 /*
@@ -2635,7 +2635,7 @@ static int shmem_removexattr(struct dentry *dentry, const char *name)
2635 2635
2636static ssize_t shmem_listxattr(struct dentry *dentry, char *buffer, size_t size) 2636static ssize_t shmem_listxattr(struct dentry *dentry, char *buffer, size_t size)
2637{ 2637{
2638 struct shmem_inode_info *info = SHMEM_I(dentry->d_inode); 2638 struct shmem_inode_info *info = SHMEM_I(d_inode(dentry));
2639 return simple_xattr_list(&info->xattrs, buffer, size); 2639 return simple_xattr_list(&info->xattrs, buffer, size);
2640} 2640}
2641#endif /* CONFIG_TMPFS_XATTR */ 2641#endif /* CONFIG_TMPFS_XATTR */