mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
filesystems: add set_nlink()
Replace remaining direct i_nlink updates with a new set_nlink() updater function. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Tested-by: Toshiyuki Okajima <toshi.okajima@jp.fujitsu.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
parent
6d6b77f163
commit
bfe8684869
81 changed files with 163 additions and 148 deletions
|
@ -612,7 +612,7 @@ static int ntfs_read_locked_inode(struct inode *vi)
|
|||
* might be tricky due to vfs interactions. Need to think about this
|
||||
* some more when implementing the unlink command.
|
||||
*/
|
||||
vi->i_nlink = le16_to_cpu(m->link_count);
|
||||
set_nlink(vi, le16_to_cpu(m->link_count));
|
||||
/*
|
||||
* FIXME: Reparse points can have the directory bit set even though
|
||||
* they would be S_IFLNK. Need to deal with this further below when we
|
||||
|
@ -634,7 +634,7 @@ static int ntfs_read_locked_inode(struct inode *vi)
|
|||
vi->i_mode &= ~vol->dmask;
|
||||
/* Things break without this kludge! */
|
||||
if (vi->i_nlink > 1)
|
||||
vi->i_nlink = 1;
|
||||
set_nlink(vi, 1);
|
||||
} else {
|
||||
vi->i_mode |= S_IFREG;
|
||||
/* Apply the file permissions mask set in the mount options. */
|
||||
|
@ -1242,7 +1242,7 @@ static int ntfs_read_locked_attr_inode(struct inode *base_vi, struct inode *vi)
|
|||
vi->i_version = base_vi->i_version;
|
||||
vi->i_uid = base_vi->i_uid;
|
||||
vi->i_gid = base_vi->i_gid;
|
||||
vi->i_nlink = base_vi->i_nlink;
|
||||
set_nlink(vi, base_vi->i_nlink);
|
||||
vi->i_mtime = base_vi->i_mtime;
|
||||
vi->i_ctime = base_vi->i_ctime;
|
||||
vi->i_atime = base_vi->i_atime;
|
||||
|
@ -1508,7 +1508,7 @@ static int ntfs_read_locked_index_inode(struct inode *base_vi, struct inode *vi)
|
|||
vi->i_version = base_vi->i_version;
|
||||
vi->i_uid = base_vi->i_uid;
|
||||
vi->i_gid = base_vi->i_gid;
|
||||
vi->i_nlink = base_vi->i_nlink;
|
||||
set_nlink(vi, base_vi->i_nlink);
|
||||
vi->i_mtime = base_vi->i_mtime;
|
||||
vi->i_ctime = base_vi->i_ctime;
|
||||
vi->i_atime = base_vi->i_atime;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue