History

filesystems: add set_nlink()

Replace remaining direct i_nlink updates with a new set_nlink() updater function.

Miklos Szeredi committed 15 years ago

Commit bfe86841 parent 6d6b77f81 files · +163 −148Browse files

Showing the changes to include/linux (1 of 81 files). Show all

Unified · Split

include/linux/fs.h+13−0
@@ -1754,6 +1754,19 @@ static inline void mark_inode_dirty_sync(struct inode *inode) · 1753 unmodified lines
1754 __mark_inode_dirty(inode, I_DIRTY_SYNC);1754 __mark_inode_dirty(inode, I_DIRTY_SYNC);
1755}1755}
1756 1756
1757/**
1758 * set_nlink - directly set an inode's link count
1759 * @inode: inode
1760 * @nlink: new nlink (should be non-zero)
1761 *
1762 * This is a low-level filesystem helper to replace any
1763 * direct filesystem manipulation of i_nlink.
1764 */
1765static inline void set_nlink(struct inode *inode, unsigned int nlink)
1766{
1767 inode->i_nlink = nlink;
1768}
1769
1757/**1770/**
1758 * inc_nlink - directly increment an inode's link count1771 * inc_nlink - directly increment an inode's link count
1759 * @inode: inode1772 * @inode: inode

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t