Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

hfs: update comments on hfs_inode_setattr

The top of function comment about hfs_inode_setattr is severely out
of date and reference a previous name for this function. Remove it,
and update the comments in the file to record the still relevant bits
directly.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://patch.msgid.link/20260325063711.3298685-2-hch@lst.de
Reviewed-by: Viacheslav Dubeyko <slava@dubeyko.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>

authored by

Christoph Hellwig and committed by
Christian Brauner
d1312979 388727ef

+2 -19
+2 -19
fs/hfs/inode.c
··· 622 622 return 0; 623 623 } 624 624 625 - /* 626 - * hfs_notify_change() 627 - * 628 - * Based very closely on fs/msdos/inode.c by Werner Almesberger 629 - * 630 - * This is the notify_change() field in the super_operations structure 631 - * for HFS file systems. The purpose is to take that changes made to 632 - * an inode and apply then in a filesystem-dependent manner. In this 633 - * case the process has a few of tasks to do: 634 - * 1) prevent changes to the i_uid and i_gid fields. 635 - * 2) map file permissions to the closest allowable permissions 636 - * 3) Since multiple Linux files can share the same on-disk inode under 637 - * HFS (for instance the data and resource forks of a file) a change 638 - * to permissions must be applied to all other in-core inodes which 639 - * correspond to the same HFS file. 640 - */ 641 - 642 625 int hfs_inode_setattr(struct mnt_idmap *idmap, struct dentry *dentry, 643 626 struct iattr *attr) 644 627 { ··· 629 646 struct hfs_sb_info *hsb = HFS_SB(inode->i_sb); 630 647 int error; 631 648 632 - error = setattr_prepare(&nop_mnt_idmap, dentry, 633 - attr); /* basic permission checks */ 649 + error = setattr_prepare(&nop_mnt_idmap, dentry, attr); 634 650 if (error) 635 651 return error; 636 652 ··· 645 663 return hsb->s_quiet ? 0 : error; 646 664 } 647 665 666 + /* map file permissions to the closest allowable permissions in HFS */ 648 667 if (attr->ia_valid & ATTR_MODE) { 649 668 /* Only the 'w' bits can ever change and only all together. */ 650 669 if (attr->ia_mode & S_IWUSR)