mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-21 04:00:01 -04: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
|
|
@ -1754,6 +1754,19 @@ static inline void mark_inode_dirty_sync(struct inode *inode)
|
|||
__mark_inode_dirty(inode, I_DIRTY_SYNC);
|
||||
}
|
||||
|
||||
/**
|
||||
* set_nlink - directly set an inode's link count
|
||||
* @inode: inode
|
||||
* @nlink: new nlink (should be non-zero)
|
||||
*
|
||||
* This is a low-level filesystem helper to replace any
|
||||
* direct filesystem manipulation of i_nlink.
|
||||
*/
|
||||
static inline void set_nlink(struct inode *inode, unsigned int nlink)
|
||||
{
|
||||
inode->i_nlink = nlink;
|
||||
}
|
||||
|
||||
/**
|
||||
* inc_nlink - directly increment an inode's link count
|
||||
* @inode: inode
|
||||
|
|
|
|||
Loading…
Reference in a new issue