file.c (4b4193256c8d3bc3a5397b5cd9494c2ad386317d) | file.c (2f221d6f7b881d95de1f356a3097d755ab1e47d4) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * linux/fs/fat/file.c 4 * 5 * Written 1992,1993 by Werner Almesberger 6 * 7 * regular file handling primitives for fat-based filesystems 8 */ --- 466 unchanged lines hidden (view full) --- 475 476 /* Check for setting the inode time. */ 477 ia_valid = attr->ia_valid; 478 if (ia_valid & TIMES_SET_FLAGS) { 479 if (fat_allow_set_time(sbi, inode)) 480 attr->ia_valid &= ~TIMES_SET_FLAGS; 481 } 482 | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * linux/fs/fat/file.c 4 * 5 * Written 1992,1993 by Werner Almesberger 6 * 7 * regular file handling primitives for fat-based filesystems 8 */ --- 466 unchanged lines hidden (view full) --- 475 476 /* Check for setting the inode time. */ 477 ia_valid = attr->ia_valid; 478 if (ia_valid & TIMES_SET_FLAGS) { 479 if (fat_allow_set_time(sbi, inode)) 480 attr->ia_valid &= ~TIMES_SET_FLAGS; 481 } 482 |
483 error = setattr_prepare(dentry, attr); | 483 error = setattr_prepare(&init_user_ns, dentry, attr); |
484 attr->ia_valid = ia_valid; 485 if (error) { 486 if (sbi->options.quiet) 487 error = 0; 488 goto out; 489 } 490 491 /* --- 53 unchanged lines hidden (view full) --- 545 if (attr->ia_valid & ATTR_ATIME) 546 fat_truncate_time(inode, &attr->ia_atime, S_ATIME); 547 if (attr->ia_valid & ATTR_CTIME) 548 fat_truncate_time(inode, &attr->ia_ctime, S_CTIME); 549 if (attr->ia_valid & ATTR_MTIME) 550 fat_truncate_time(inode, &attr->ia_mtime, S_MTIME); 551 attr->ia_valid &= ~(ATTR_ATIME|ATTR_CTIME|ATTR_MTIME); 552 | 484 attr->ia_valid = ia_valid; 485 if (error) { 486 if (sbi->options.quiet) 487 error = 0; 488 goto out; 489 } 490 491 /* --- 53 unchanged lines hidden (view full) --- 545 if (attr->ia_valid & ATTR_ATIME) 546 fat_truncate_time(inode, &attr->ia_atime, S_ATIME); 547 if (attr->ia_valid & ATTR_CTIME) 548 fat_truncate_time(inode, &attr->ia_ctime, S_CTIME); 549 if (attr->ia_valid & ATTR_MTIME) 550 fat_truncate_time(inode, &attr->ia_mtime, S_MTIME); 551 attr->ia_valid &= ~(ATTR_ATIME|ATTR_CTIME|ATTR_MTIME); 552 |
553 setattr_copy(inode, attr); | 553 setattr_copy(&init_user_ns, inode, attr); |
554 mark_inode_dirty(inode); 555out: 556 return error; 557} 558EXPORT_SYMBOL_GPL(fat_setattr); 559 560const struct inode_operations fat_file_inode_operations = { 561 .setattr = fat_setattr, 562 .getattr = fat_getattr, 563 .update_time = fat_update_time, 564}; | 554 mark_inode_dirty(inode); 555out: 556 return error; 557} 558EXPORT_SYMBOL_GPL(fat_setattr); 559 560const struct inode_operations fat_file_inode_operations = { 561 .setattr = fat_setattr, 562 .getattr = fat_getattr, 563 .update_time = fat_update_time, 564}; |