diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-19 21:19:19 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-19 21:19:19 -0500 |
commit | ecb5ec044ab99be1f35e93962fa43e4bb3120d9e (patch) | |
tree | 8832ba0b39783bd8a836b5552eb8f74d2e450afe /drivers/staging | |
parent | 298647e31af52e795867a399fa049cebd88067ff (diff) | |
parent | e3bb504efd919f7bacd24cb14038953899b909e1 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs pile #3 from Al Viro:
"Assorted fixes and patches from the last cycle"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
[regression] chunk lost from bd9b51
vfs: make mounts and mountstats honor root dir like mountinfo does
vfs: cleanup show_mountinfo
init: fix read-write root mount
unfuck binfmt_misc.c (broken by commit e6084d4)
vm_area_operations: kill ->migrate()
new helper: iter_is_iovec()
move_extent_per_page(): get rid of unused w_flags
lustre: get rid of playing with ->fs
btrfs: filp_open() returns ERR_PTR() on failure, not NULL...
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/lustre/lustre/include/linux/lustre_compat25.h | 24 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/llite/dir.c | 2 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/llite/llite_lib.c | 17 |
3 files changed, 2 insertions, 41 deletions
diff --git a/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h b/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h index 8156b4c0f568..3925db160650 100644 --- a/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h +++ b/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h | |||
@@ -42,28 +42,6 @@ | |||
42 | 42 | ||
43 | #include "lustre_patchless_compat.h" | 43 | #include "lustre_patchless_compat.h" |
44 | 44 | ||
45 | # define LOCK_FS_STRUCT(fs) spin_lock(&(fs)->lock) | ||
46 | # define UNLOCK_FS_STRUCT(fs) spin_unlock(&(fs)->lock) | ||
47 | |||
48 | static inline void ll_set_fs_pwd(struct fs_struct *fs, struct vfsmount *mnt, | ||
49 | struct dentry *dentry) | ||
50 | { | ||
51 | struct path path; | ||
52 | struct path old_pwd; | ||
53 | |||
54 | path.mnt = mnt; | ||
55 | path.dentry = dentry; | ||
56 | LOCK_FS_STRUCT(fs); | ||
57 | old_pwd = fs->pwd; | ||
58 | path_get(&path); | ||
59 | fs->pwd = path; | ||
60 | UNLOCK_FS_STRUCT(fs); | ||
61 | |||
62 | if (old_pwd.dentry) | ||
63 | path_put(&old_pwd); | ||
64 | } | ||
65 | |||
66 | |||
67 | /* | 45 | /* |
68 | * set ATTR_BLOCKS to a high value to avoid any risk of collision with other | 46 | * set ATTR_BLOCKS to a high value to avoid any risk of collision with other |
69 | * ATTR_* attributes (see bug 13828) | 47 | * ATTR_* attributes (see bug 13828) |
@@ -110,8 +88,6 @@ static inline void ll_set_fs_pwd(struct fs_struct *fs, struct vfsmount *mnt, | |||
110 | #define cfs_bio_io_error(a, b) bio_io_error((a)) | 88 | #define cfs_bio_io_error(a, b) bio_io_error((a)) |
111 | #define cfs_bio_endio(a, b, c) bio_endio((a), (c)) | 89 | #define cfs_bio_endio(a, b, c) bio_endio((a), (c)) |
112 | 90 | ||
113 | #define cfs_fs_pwd(fs) ((fs)->pwd.dentry) | ||
114 | #define cfs_fs_mnt(fs) ((fs)->pwd.mnt) | ||
115 | #define cfs_path_put(nd) path_put(&(nd)->path) | 91 | #define cfs_path_put(nd) path_put(&(nd)->path) |
116 | 92 | ||
117 | 93 | ||
diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c index 407718a0026f..1ac7a702ce26 100644 --- a/drivers/staging/lustre/lustre/llite/dir.c +++ b/drivers/staging/lustre/lustre/llite/dir.c | |||
@@ -661,7 +661,7 @@ int ll_dir_setdirstripe(struct inode *dir, struct lmv_user_md *lump, | |||
661 | int mode; | 661 | int mode; |
662 | int err; | 662 | int err; |
663 | 663 | ||
664 | mode = (0755 & (S_IRWXUGO|S_ISVTX) & ~current->fs->umask) | S_IFDIR; | 664 | mode = (0755 & ~current_umask()) | S_IFDIR; |
665 | op_data = ll_prep_md_op_data(NULL, dir, NULL, filename, | 665 | op_data = ll_prep_md_op_data(NULL, dir, NULL, filename, |
666 | strlen(filename), mode, LUSTRE_OPC_MKDIR, | 666 | strlen(filename), mode, LUSTRE_OPC_MKDIR, |
667 | lump); | 667 | lump); |
diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c index 6e423aa6a6e4..a3367bfb1456 100644 --- a/drivers/staging/lustre/lustre/llite/llite_lib.c +++ b/drivers/staging/lustre/lustre/llite/llite_lib.c | |||
@@ -2372,21 +2372,6 @@ char *ll_get_fsname(struct super_block *sb, char *buf, int buflen) | |||
2372 | return buf; | 2372 | return buf; |
2373 | } | 2373 | } |
2374 | 2374 | ||
2375 | static char *ll_d_path(struct dentry *dentry, char *buf, int bufsize) | ||
2376 | { | ||
2377 | char *path = NULL; | ||
2378 | |||
2379 | struct path p; | ||
2380 | |||
2381 | p.dentry = dentry; | ||
2382 | p.mnt = current->fs->root.mnt; | ||
2383 | path_get(&p); | ||
2384 | path = d_path(&p, buf, bufsize); | ||
2385 | path_put(&p); | ||
2386 | |||
2387 | return path; | ||
2388 | } | ||
2389 | |||
2390 | void ll_dirty_page_discard_warn(struct page *page, int ioret) | 2375 | void ll_dirty_page_discard_warn(struct page *page, int ioret) |
2391 | { | 2376 | { |
2392 | char *buf, *path = NULL; | 2377 | char *buf, *path = NULL; |
@@ -2398,7 +2383,7 @@ void ll_dirty_page_discard_warn(struct page *page, int ioret) | |||
2398 | if (buf != NULL) { | 2383 | if (buf != NULL) { |
2399 | dentry = d_find_alias(page->mapping->host); | 2384 | dentry = d_find_alias(page->mapping->host); |
2400 | if (dentry != NULL) | 2385 | if (dentry != NULL) |
2401 | path = ll_d_path(dentry, buf, PAGE_SIZE); | 2386 | path = dentry_path_raw(dentry, buf, PAGE_SIZE); |
2402 | } | 2387 | } |
2403 | 2388 | ||
2404 | CDEBUG(D_WARNING, | 2389 | CDEBUG(D_WARNING, |