diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-10 16:04:49 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-10 16:04:49 -0400 |
commit | abb5a14fa20fdd400995926134b7be9eb8ce6048 (patch) | |
tree | 085add41cae3193b8c8293d25b453fd1ecae0c19 /fs/orangefs | |
parent | 911f9dab301e8583143c7e75b552eadd434ea0a8 (diff) | |
parent | e55f1d1d13e7f1c364672d667d78fd1f640ab9f9 (diff) |
Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull misc vfs updates from Al Viro:
"Assorted misc bits and pieces.
There are several single-topic branches left after this (rename2
series from Miklos, current_time series from Deepa Dinamani, xattr
series from Andreas, uaccess stuff from from me) and I'd prefer to
send those separately"
* 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (39 commits)
proc: switch auxv to use of __mem_open()
hpfs: support FIEMAP
cifs: get rid of unused arguments of CIFSSMBWrite()
posix_acl: uapi header split
posix_acl: xattr representation cleanups
fs/aio.c: eliminate redundant loads in put_aio_ring_file
fs/internal.h: add const to ns_dentry_operations declaration
compat: remove compat_printk()
fs/buffer.c: make __getblk_slow() static
proc: unsigned file descriptors
fs/file: more unsigned file descriptors
fs: compat: remove redundant check of nr_segs
cachefiles: Fix attempt to read i_blocks after deleting file [ver #2]
cifs: don't use memcpy() to copy struct iov_iter
get rid of separate multipage fault-in primitives
fs: Avoid premature clearing of capabilities
fs: Give dentry to inode_change_ok() instead of inode
fuse: Propagate dentry down to inode_change_ok()
ceph: Propagate dentry down to inode_change_ok()
xfs: Propagate dentry down to inode_change_ok()
...
Diffstat (limited to 'fs/orangefs')
-rw-r--r-- | fs/orangefs/acl.c | 15 | ||||
-rw-r--r-- | fs/orangefs/dir.c | 4 | ||||
-rw-r--r-- | fs/orangefs/file.c | 4 | ||||
-rw-r--r-- | fs/orangefs/inode.c | 14 | ||||
-rw-r--r-- | fs/orangefs/namei.c | 44 | ||||
-rw-r--r-- | fs/orangefs/orangefs-debugfs.c | 4 |
6 files changed, 40 insertions, 45 deletions
diff --git a/fs/orangefs/acl.c b/fs/orangefs/acl.c index 28f2195cd798..7a3754488312 100644 --- a/fs/orangefs/acl.c +++ b/fs/orangefs/acl.c | |||
@@ -73,14 +73,11 @@ int orangefs_set_acl(struct inode *inode, struct posix_acl *acl, int type) | |||
73 | case ACL_TYPE_ACCESS: | 73 | case ACL_TYPE_ACCESS: |
74 | name = XATTR_NAME_POSIX_ACL_ACCESS; | 74 | name = XATTR_NAME_POSIX_ACL_ACCESS; |
75 | if (acl) { | 75 | if (acl) { |
76 | umode_t mode = inode->i_mode; | 76 | umode_t mode; |
77 | /* | 77 | |
78 | * can we represent this with the traditional file | 78 | error = posix_acl_update_mode(inode, &mode, &acl); |
79 | * mode permission bits? | 79 | if (error) { |
80 | */ | 80 | gossip_err("%s: posix_acl_update_mode err: %d\n", |
81 | error = posix_acl_equiv_mode(acl, &mode); | ||
82 | if (error < 0) { | ||
83 | gossip_err("%s: posix_acl_equiv_mode err: %d\n", | ||
84 | __func__, | 81 | __func__, |
85 | error); | 82 | error); |
86 | return error; | 83 | return error; |
@@ -90,8 +87,6 @@ int orangefs_set_acl(struct inode *inode, struct posix_acl *acl, int type) | |||
90 | SetModeFlag(orangefs_inode); | 87 | SetModeFlag(orangefs_inode); |
91 | inode->i_mode = mode; | 88 | inode->i_mode = mode; |
92 | mark_inode_dirty_sync(inode); | 89 | mark_inode_dirty_sync(inode); |
93 | if (error == 0) | ||
94 | acl = NULL; | ||
95 | } | 90 | } |
96 | break; | 91 | break; |
97 | case ACL_TYPE_DEFAULT: | 92 | case ACL_TYPE_DEFAULT: |
diff --git a/fs/orangefs/dir.c b/fs/orangefs/dir.c index 324f0af40d7b..284373a57a08 100644 --- a/fs/orangefs/dir.c +++ b/fs/orangefs/dir.c | |||
@@ -177,8 +177,8 @@ static int orangefs_readdir(struct file *file, struct dir_context *ctx) | |||
177 | } | 177 | } |
178 | 178 | ||
179 | gossip_debug(GOSSIP_DIR_DEBUG, | 179 | gossip_debug(GOSSIP_DIR_DEBUG, |
180 | "orangefs_readdir called on %s (pos=%llu)\n", | 180 | "orangefs_readdir called on %pd (pos=%llu)\n", |
181 | dentry->d_name.name, llu(pos)); | 181 | dentry, llu(pos)); |
182 | 182 | ||
183 | memset(&readdir_response, 0, sizeof(readdir_response)); | 183 | memset(&readdir_response, 0, sizeof(readdir_response)); |
184 | 184 | ||
diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c index 3386886596d6..2aa088ab713b 100644 --- a/fs/orangefs/file.c +++ b/fs/orangefs/file.c | |||
@@ -611,8 +611,8 @@ static int orangefs_file_mmap(struct file *file, struct vm_area_struct *vma) | |||
611 | static int orangefs_file_release(struct inode *inode, struct file *file) | 611 | static int orangefs_file_release(struct inode *inode, struct file *file) |
612 | { | 612 | { |
613 | gossip_debug(GOSSIP_FILE_DEBUG, | 613 | gossip_debug(GOSSIP_FILE_DEBUG, |
614 | "orangefs_file_release: called on %s\n", | 614 | "orangefs_file_release: called on %pD\n", |
615 | file->f_path.dentry->d_name.name); | 615 | file); |
616 | 616 | ||
617 | orangefs_flush_inode(inode); | 617 | orangefs_flush_inode(inode); |
618 | 618 | ||
diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c index 28a0557a69be..c83846fb9b14 100644 --- a/fs/orangefs/inode.c +++ b/fs/orangefs/inode.c | |||
@@ -129,8 +129,8 @@ static ssize_t orangefs_direct_IO(struct kiocb *iocb, | |||
129 | struct iov_iter *iter) | 129 | struct iov_iter *iter) |
130 | { | 130 | { |
131 | gossip_debug(GOSSIP_INODE_DEBUG, | 131 | gossip_debug(GOSSIP_INODE_DEBUG, |
132 | "orangefs_direct_IO: %s\n", | 132 | "orangefs_direct_IO: %pD\n", |
133 | iocb->ki_filp->f_path.dentry->d_name.name); | 133 | iocb->ki_filp); |
134 | 134 | ||
135 | return -EINVAL; | 135 | return -EINVAL; |
136 | } | 136 | } |
@@ -216,10 +216,10 @@ int orangefs_setattr(struct dentry *dentry, struct iattr *iattr) | |||
216 | struct inode *inode = dentry->d_inode; | 216 | struct inode *inode = dentry->d_inode; |
217 | 217 | ||
218 | gossip_debug(GOSSIP_INODE_DEBUG, | 218 | gossip_debug(GOSSIP_INODE_DEBUG, |
219 | "orangefs_setattr: called on %s\n", | 219 | "orangefs_setattr: called on %pd\n", |
220 | dentry->d_name.name); | 220 | dentry); |
221 | 221 | ||
222 | ret = inode_change_ok(inode, iattr); | 222 | ret = setattr_prepare(dentry, iattr); |
223 | if (ret) | 223 | if (ret) |
224 | goto out; | 224 | goto out; |
225 | 225 | ||
@@ -259,8 +259,8 @@ int orangefs_getattr(struct vfsmount *mnt, | |||
259 | struct orangefs_inode_s *orangefs_inode = NULL; | 259 | struct orangefs_inode_s *orangefs_inode = NULL; |
260 | 260 | ||
261 | gossip_debug(GOSSIP_INODE_DEBUG, | 261 | gossip_debug(GOSSIP_INODE_DEBUG, |
262 | "orangefs_getattr: called on %s\n", | 262 | "orangefs_getattr: called on %pd\n", |
263 | dentry->d_name.name); | 263 | dentry); |
264 | 264 | ||
265 | ret = orangefs_inode_getattr(inode, 0, 0); | 265 | ret = orangefs_inode_getattr(inode, 0, 0); |
266 | if (ret == 0) { | 266 | if (ret == 0) { |
diff --git a/fs/orangefs/namei.c b/fs/orangefs/namei.c index 35269e31de92..0e34fcfa4d51 100644 --- a/fs/orangefs/namei.c +++ b/fs/orangefs/namei.c | |||
@@ -24,9 +24,9 @@ static int orangefs_create(struct inode *dir, | |||
24 | struct inode *inode; | 24 | struct inode *inode; |
25 | int ret; | 25 | int ret; |
26 | 26 | ||
27 | gossip_debug(GOSSIP_NAME_DEBUG, "%s: %s\n", | 27 | gossip_debug(GOSSIP_NAME_DEBUG, "%s: %pd\n", |
28 | __func__, | 28 | __func__, |
29 | dentry->d_name.name); | 29 | dentry); |
30 | 30 | ||
31 | new_op = op_alloc(ORANGEFS_VFS_OP_CREATE); | 31 | new_op = op_alloc(ORANGEFS_VFS_OP_CREATE); |
32 | if (!new_op) | 32 | if (!new_op) |
@@ -43,9 +43,9 @@ static int orangefs_create(struct inode *dir, | |||
43 | ret = service_operation(new_op, __func__, get_interruptible_flag(dir)); | 43 | ret = service_operation(new_op, __func__, get_interruptible_flag(dir)); |
44 | 44 | ||
45 | gossip_debug(GOSSIP_NAME_DEBUG, | 45 | gossip_debug(GOSSIP_NAME_DEBUG, |
46 | "%s: %s: handle:%pU: fsid:%d: new_op:%p: ret:%d:\n", | 46 | "%s: %pd: handle:%pU: fsid:%d: new_op:%p: ret:%d:\n", |
47 | __func__, | 47 | __func__, |
48 | dentry->d_name.name, | 48 | dentry, |
49 | &new_op->downcall.resp.create.refn.khandle, | 49 | &new_op->downcall.resp.create.refn.khandle, |
50 | new_op->downcall.resp.create.refn.fs_id, | 50 | new_op->downcall.resp.create.refn.fs_id, |
51 | new_op, | 51 | new_op, |
@@ -57,18 +57,18 @@ static int orangefs_create(struct inode *dir, | |||
57 | inode = orangefs_new_inode(dir->i_sb, dir, S_IFREG | mode, 0, | 57 | inode = orangefs_new_inode(dir->i_sb, dir, S_IFREG | mode, 0, |
58 | &new_op->downcall.resp.create.refn); | 58 | &new_op->downcall.resp.create.refn); |
59 | if (IS_ERR(inode)) { | 59 | if (IS_ERR(inode)) { |
60 | gossip_err("%s: Failed to allocate inode for file :%s:\n", | 60 | gossip_err("%s: Failed to allocate inode for file :%pd:\n", |
61 | __func__, | 61 | __func__, |
62 | dentry->d_name.name); | 62 | dentry); |
63 | ret = PTR_ERR(inode); | 63 | ret = PTR_ERR(inode); |
64 | goto out; | 64 | goto out; |
65 | } | 65 | } |
66 | 66 | ||
67 | gossip_debug(GOSSIP_NAME_DEBUG, | 67 | gossip_debug(GOSSIP_NAME_DEBUG, |
68 | "%s: Assigned inode :%pU: for file :%s:\n", | 68 | "%s: Assigned inode :%pU: for file :%pd:\n", |
69 | __func__, | 69 | __func__, |
70 | get_khandle_from_ino(inode), | 70 | get_khandle_from_ino(inode), |
71 | dentry->d_name.name); | 71 | dentry); |
72 | 72 | ||
73 | d_instantiate(dentry, inode); | 73 | d_instantiate(dentry, inode); |
74 | unlock_new_inode(inode); | 74 | unlock_new_inode(inode); |
@@ -76,9 +76,9 @@ static int orangefs_create(struct inode *dir, | |||
76 | ORANGEFS_I(inode)->getattr_time = jiffies - 1; | 76 | ORANGEFS_I(inode)->getattr_time = jiffies - 1; |
77 | 77 | ||
78 | gossip_debug(GOSSIP_NAME_DEBUG, | 78 | gossip_debug(GOSSIP_NAME_DEBUG, |
79 | "%s: dentry instantiated for %s\n", | 79 | "%s: dentry instantiated for %pd\n", |
80 | __func__, | 80 | __func__, |
81 | dentry->d_name.name); | 81 | dentry); |
82 | 82 | ||
83 | SetMtimeFlag(parent); | 83 | SetMtimeFlag(parent); |
84 | dir->i_mtime = dir->i_ctime = current_fs_time(dir->i_sb); | 84 | dir->i_mtime = dir->i_ctime = current_fs_time(dir->i_sb); |
@@ -87,9 +87,9 @@ static int orangefs_create(struct inode *dir, | |||
87 | out: | 87 | out: |
88 | op_release(new_op); | 88 | op_release(new_op); |
89 | gossip_debug(GOSSIP_NAME_DEBUG, | 89 | gossip_debug(GOSSIP_NAME_DEBUG, |
90 | "%s: %s: returning %d\n", | 90 | "%s: %pd: returning %d\n", |
91 | __func__, | 91 | __func__, |
92 | dentry->d_name.name, | 92 | dentry, |
93 | ret); | 93 | ret); |
94 | return ret; | 94 | return ret; |
95 | } | 95 | } |
@@ -115,8 +115,8 @@ static struct dentry *orangefs_lookup(struct inode *dir, struct dentry *dentry, | |||
115 | * -EEXIST on O_EXCL opens, which is broken if we skip this lookup | 115 | * -EEXIST on O_EXCL opens, which is broken if we skip this lookup |
116 | * in the create path) | 116 | * in the create path) |
117 | */ | 117 | */ |
118 | gossip_debug(GOSSIP_NAME_DEBUG, "%s called on %s\n", | 118 | gossip_debug(GOSSIP_NAME_DEBUG, "%s called on %pd\n", |
119 | __func__, dentry->d_name.name); | 119 | __func__, dentry); |
120 | 120 | ||
121 | if (dentry->d_name.len > (ORANGEFS_NAME_MAX - 1)) | 121 | if (dentry->d_name.len > (ORANGEFS_NAME_MAX - 1)) |
122 | return ERR_PTR(-ENAMETOOLONG); | 122 | return ERR_PTR(-ENAMETOOLONG); |
@@ -169,9 +169,9 @@ static struct dentry *orangefs_lookup(struct inode *dir, struct dentry *dentry, | |||
169 | 169 | ||
170 | gossip_debug(GOSSIP_NAME_DEBUG, | 170 | gossip_debug(GOSSIP_NAME_DEBUG, |
171 | "orangefs_lookup: Adding *negative* dentry " | 171 | "orangefs_lookup: Adding *negative* dentry " |
172 | "%p for %s\n", | 172 | "%p for %pd\n", |
173 | dentry, | 173 | dentry, |
174 | dentry->d_name.name); | 174 | dentry); |
175 | 175 | ||
176 | d_add(dentry, NULL); | 176 | d_add(dentry, NULL); |
177 | res = NULL; | 177 | res = NULL; |
@@ -224,10 +224,10 @@ static int orangefs_unlink(struct inode *dir, struct dentry *dentry) | |||
224 | int ret; | 224 | int ret; |
225 | 225 | ||
226 | gossip_debug(GOSSIP_NAME_DEBUG, | 226 | gossip_debug(GOSSIP_NAME_DEBUG, |
227 | "%s: called on %s\n" | 227 | "%s: called on %pd\n" |
228 | " (inode %pU): Parent is %pU | fs_id %d\n", | 228 | " (inode %pU): Parent is %pU | fs_id %d\n", |
229 | __func__, | 229 | __func__, |
230 | dentry->d_name.name, | 230 | dentry, |
231 | get_khandle_from_ino(inode), | 231 | get_khandle_from_ino(inode), |
232 | &parent->refn.khandle, | 232 | &parent->refn.khandle, |
233 | parent->refn.fs_id); | 233 | parent->refn.fs_id); |
@@ -326,9 +326,9 @@ static int orangefs_symlink(struct inode *dir, | |||
326 | ORANGEFS_I(inode)->getattr_time = jiffies - 1; | 326 | ORANGEFS_I(inode)->getattr_time = jiffies - 1; |
327 | 327 | ||
328 | gossip_debug(GOSSIP_NAME_DEBUG, | 328 | gossip_debug(GOSSIP_NAME_DEBUG, |
329 | "Inode (Symlink) %pU -> %s\n", | 329 | "Inode (Symlink) %pU -> %pd\n", |
330 | get_khandle_from_ino(inode), | 330 | get_khandle_from_ino(inode), |
331 | dentry->d_name.name); | 331 | dentry); |
332 | 332 | ||
333 | SetMtimeFlag(parent); | 333 | SetMtimeFlag(parent); |
334 | dir->i_mtime = dir->i_ctime = current_fs_time(dir->i_sb); | 334 | dir->i_mtime = dir->i_ctime = current_fs_time(dir->i_sb); |
@@ -390,9 +390,9 @@ static int orangefs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode | |||
390 | ORANGEFS_I(inode)->getattr_time = jiffies - 1; | 390 | ORANGEFS_I(inode)->getattr_time = jiffies - 1; |
391 | 391 | ||
392 | gossip_debug(GOSSIP_NAME_DEBUG, | 392 | gossip_debug(GOSSIP_NAME_DEBUG, |
393 | "Inode (Directory) %pU -> %s\n", | 393 | "Inode (Directory) %pU -> %pd\n", |
394 | get_khandle_from_ino(inode), | 394 | get_khandle_from_ino(inode), |
395 | dentry->d_name.name); | 395 | dentry); |
396 | 396 | ||
397 | /* | 397 | /* |
398 | * NOTE: we have no good way to keep nlink consistent for directories | 398 | * NOTE: we have no good way to keep nlink consistent for directories |
diff --git a/fs/orangefs/orangefs-debugfs.c b/fs/orangefs/orangefs-debugfs.c index 9b24107c82a8..eb09aa026723 100644 --- a/fs/orangefs/orangefs-debugfs.c +++ b/fs/orangefs/orangefs-debugfs.c | |||
@@ -428,8 +428,8 @@ static ssize_t orangefs_debug_write(struct file *file, | |||
428 | struct client_debug_mask c_mask = { NULL, 0, 0 }; | 428 | struct client_debug_mask c_mask = { NULL, 0, 0 }; |
429 | 429 | ||
430 | gossip_debug(GOSSIP_DEBUGFS_DEBUG, | 430 | gossip_debug(GOSSIP_DEBUGFS_DEBUG, |
431 | "orangefs_debug_write: %s\n", | 431 | "orangefs_debug_write: %pD\n", |
432 | file->f_path.dentry->d_name.name); | 432 | file); |
433 | 433 | ||
434 | /* | 434 | /* |
435 | * Thwart users who try to jamb a ridiculous number | 435 | * Thwart users who try to jamb a ridiculous number |