* [PATCH 1/5] Extract inode_inc_count(), inode_dec_count()
@ 2006-01-18 0:34 Alexey Dobriyan
2006-01-18 1:18 ` Andrew Morton
0 siblings, 1 reply; 2+ messages in thread
From: Alexey Dobriyan @ 2006-01-18 0:34 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---
include/linux/fs.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1112,6 +1112,18 @@ static inline void mark_inode_dirty_sync
__mark_inode_dirty(inode, I_DIRTY_SYNC);
}
+static inline void inode_inc_count(struct inode *inode)
+{
+ inode->i_nlink++;
+ mark_inode_dirty(inode);
+}
+
+static inline void inode_dec_count(struct inode *inode)
+{
+ inode->i_nlink--;
+ mark_inode_dirty(inode);
+}
+
extern void touch_atime(struct vfsmount *mnt, struct dentry *dentry);
static inline void file_accessed(struct file *file)
{
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 1/5] Extract inode_inc_count(), inode_dec_count()
2006-01-18 0:34 [PATCH 1/5] Extract inode_inc_count(), inode_dec_count() Alexey Dobriyan
@ 2006-01-18 1:18 ` Andrew Morton
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2006-01-18 1:18 UTC (permalink / raw)
To: Alexey Dobriyan; +Cc: linux-kernel
Alexey Dobriyan <adobriyan@gmail.com> wrote:
>
> +static inline void inode_inc_count(struct inode *inode)
> +{
> + inode->i_nlink++;
> + mark_inode_dirty(inode);
> +}
hm, OK. I think I'll switch these all to inode_inc_link_count(), to
clearly distinguish them from the various functions which diddle ->i_count.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-01-18 1:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-18 0:34 [PATCH 1/5] Extract inode_inc_count(), inode_dec_count() Alexey Dobriyan
2006-01-18 1:18 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).