.. | .. |
---|
58 | 58 | goto out; |
---|
59 | 59 | |
---|
60 | 60 | ref = new_op->downcall.resp.create.refn; |
---|
61 | | - op_release(new_op); |
---|
62 | 61 | |
---|
63 | 62 | inode = orangefs_new_inode(dir->i_sb, dir, S_IFREG | mode, 0, &ref); |
---|
64 | 63 | if (IS_ERR(inode)) { |
---|
.. | .. |
---|
77 | 76 | |
---|
78 | 77 | d_instantiate_new(dentry, inode); |
---|
79 | 78 | orangefs_set_timeout(dentry); |
---|
80 | | - ORANGEFS_I(inode)->getattr_time = jiffies - 1; |
---|
81 | | - ORANGEFS_I(inode)->getattr_mask = STATX_BASIC_STATS; |
---|
82 | 79 | |
---|
83 | 80 | gossip_debug(GOSSIP_NAME_DEBUG, |
---|
84 | 81 | "%s: dentry instantiated for %pd\n", |
---|
85 | 82 | __func__, |
---|
86 | 83 | dentry); |
---|
87 | 84 | |
---|
88 | | - dir->i_mtime = dir->i_ctime = current_time(dir); |
---|
89 | 85 | memset(&iattr, 0, sizeof iattr); |
---|
90 | | - iattr.ia_valid |= ATTR_MTIME; |
---|
91 | | - orangefs_inode_setattr(dir, &iattr); |
---|
92 | | - mark_inode_dirty_sync(dir); |
---|
| 86 | + iattr.ia_valid |= ATTR_MTIME | ATTR_CTIME; |
---|
| 87 | + iattr.ia_mtime = iattr.ia_ctime = current_time(dir); |
---|
| 88 | + __orangefs_setattr(dir, &iattr); |
---|
93 | 89 | ret = 0; |
---|
94 | 90 | out: |
---|
| 91 | + op_release(new_op); |
---|
95 | 92 | gossip_debug(GOSSIP_NAME_DEBUG, |
---|
96 | 93 | "%s: %pd: returning %d\n", |
---|
97 | 94 | __func__, |
---|
.. | .. |
---|
157 | 154 | new_op->downcall.resp.lookup.refn.fs_id, |
---|
158 | 155 | ret); |
---|
159 | 156 | |
---|
160 | | - if (ret >= 0) { |
---|
| 157 | + if (ret == 0) { |
---|
161 | 158 | orangefs_set_timeout(dentry); |
---|
162 | 159 | inode = orangefs_iget(dir->i_sb, &new_op->downcall.resp.lookup.refn); |
---|
163 | 160 | } else if (ret == -ENOENT) { |
---|
.. | .. |
---|
210 | 207 | if (!ret) { |
---|
211 | 208 | drop_nlink(inode); |
---|
212 | 209 | |
---|
213 | | - dir->i_mtime = dir->i_ctime = current_time(dir); |
---|
214 | 210 | memset(&iattr, 0, sizeof iattr); |
---|
215 | | - iattr.ia_valid |= ATTR_MTIME; |
---|
216 | | - orangefs_inode_setattr(dir, &iattr); |
---|
217 | | - mark_inode_dirty_sync(dir); |
---|
| 211 | + iattr.ia_valid |= ATTR_MTIME | ATTR_CTIME; |
---|
| 212 | + iattr.ia_mtime = iattr.ia_ctime = current_time(dir); |
---|
| 213 | + __orangefs_setattr(dir, &iattr); |
---|
218 | 214 | } |
---|
219 | 215 | return ret; |
---|
220 | 216 | } |
---|
.. | .. |
---|
228 | 224 | struct orangefs_object_kref ref; |
---|
229 | 225 | struct inode *inode; |
---|
230 | 226 | struct iattr iattr; |
---|
231 | | - int mode = 755; |
---|
| 227 | + int mode = 0755; |
---|
232 | 228 | int ret; |
---|
233 | 229 | |
---|
234 | 230 | gossip_debug(GOSSIP_NAME_DEBUG, "%s: called\n", __func__); |
---|
.. | .. |
---|
269 | 265 | } |
---|
270 | 266 | |
---|
271 | 267 | ref = new_op->downcall.resp.sym.refn; |
---|
272 | | - op_release(new_op); |
---|
273 | 268 | |
---|
274 | 269 | inode = orangefs_new_inode(dir->i_sb, dir, S_IFLNK | mode, 0, &ref); |
---|
275 | 270 | if (IS_ERR(inode)) { |
---|
.. | .. |
---|
292 | 287 | |
---|
293 | 288 | d_instantiate_new(dentry, inode); |
---|
294 | 289 | orangefs_set_timeout(dentry); |
---|
295 | | - ORANGEFS_I(inode)->getattr_time = jiffies - 1; |
---|
296 | | - ORANGEFS_I(inode)->getattr_mask = STATX_BASIC_STATS; |
---|
297 | 290 | |
---|
298 | 291 | gossip_debug(GOSSIP_NAME_DEBUG, |
---|
299 | 292 | "Inode (Symlink) %pU -> %pd\n", |
---|
300 | 293 | get_khandle_from_ino(inode), |
---|
301 | 294 | dentry); |
---|
302 | 295 | |
---|
303 | | - dir->i_mtime = dir->i_ctime = current_time(dir); |
---|
304 | 296 | memset(&iattr, 0, sizeof iattr); |
---|
305 | | - iattr.ia_valid |= ATTR_MTIME; |
---|
306 | | - orangefs_inode_setattr(dir, &iattr); |
---|
307 | | - mark_inode_dirty_sync(dir); |
---|
| 297 | + iattr.ia_valid |= ATTR_MTIME | ATTR_CTIME; |
---|
| 298 | + iattr.ia_mtime = iattr.ia_ctime = current_time(dir); |
---|
| 299 | + __orangefs_setattr(dir, &iattr); |
---|
308 | 300 | ret = 0; |
---|
309 | 301 | out: |
---|
| 302 | + op_release(new_op); |
---|
310 | 303 | return ret; |
---|
311 | 304 | } |
---|
312 | 305 | |
---|
.. | .. |
---|
346 | 339 | } |
---|
347 | 340 | |
---|
348 | 341 | ref = new_op->downcall.resp.mkdir.refn; |
---|
349 | | - op_release(new_op); |
---|
350 | 342 | |
---|
351 | 343 | inode = orangefs_new_inode(dir->i_sb, dir, S_IFDIR | mode, 0, &ref); |
---|
352 | 344 | if (IS_ERR(inode)) { |
---|
.. | .. |
---|
361 | 353 | |
---|
362 | 354 | d_instantiate_new(dentry, inode); |
---|
363 | 355 | orangefs_set_timeout(dentry); |
---|
364 | | - ORANGEFS_I(inode)->getattr_time = jiffies - 1; |
---|
365 | | - ORANGEFS_I(inode)->getattr_mask = STATX_BASIC_STATS; |
---|
366 | 356 | |
---|
367 | 357 | gossip_debug(GOSSIP_NAME_DEBUG, |
---|
368 | 358 | "Inode (Directory) %pU -> %pd\n", |
---|
.. | .. |
---|
373 | 363 | * NOTE: we have no good way to keep nlink consistent for directories |
---|
374 | 364 | * across clients; keep constant at 1. |
---|
375 | 365 | */ |
---|
376 | | - dir->i_mtime = dir->i_ctime = current_time(dir); |
---|
377 | 366 | memset(&iattr, 0, sizeof iattr); |
---|
378 | | - iattr.ia_valid |= ATTR_MTIME; |
---|
379 | | - orangefs_inode_setattr(dir, &iattr); |
---|
380 | | - mark_inode_dirty_sync(dir); |
---|
| 367 | + iattr.ia_valid |= ATTR_MTIME | ATTR_CTIME; |
---|
| 368 | + iattr.ia_mtime = iattr.ia_ctime = current_time(dir); |
---|
| 369 | + __orangefs_setattr(dir, &iattr); |
---|
381 | 370 | out: |
---|
| 371 | + op_release(new_op); |
---|
382 | 372 | return ret; |
---|
383 | 373 | } |
---|
384 | 374 | |
---|
.. | .. |
---|
389 | 379 | unsigned int flags) |
---|
390 | 380 | { |
---|
391 | 381 | struct orangefs_kernel_op_s *new_op; |
---|
| 382 | + struct iattr iattr; |
---|
392 | 383 | int ret; |
---|
393 | 384 | |
---|
394 | 385 | if (flags) |
---|
.. | .. |
---|
398 | 389 | "orangefs_rename: called (%pd2 => %pd2) ct=%d\n", |
---|
399 | 390 | old_dentry, new_dentry, d_count(new_dentry)); |
---|
400 | 391 | |
---|
401 | | - ORANGEFS_I(new_dentry->d_parent->d_inode)->getattr_time = jiffies - 1; |
---|
| 392 | + memset(&iattr, 0, sizeof iattr); |
---|
| 393 | + iattr.ia_valid |= ATTR_MTIME | ATTR_CTIME; |
---|
| 394 | + iattr.ia_mtime = iattr.ia_ctime = current_time(new_dir); |
---|
| 395 | + __orangefs_setattr(new_dir, &iattr); |
---|
402 | 396 | |
---|
403 | 397 | new_op = op_alloc(ORANGEFS_VFS_OP_RENAME); |
---|
404 | 398 | if (!new_op) |
---|