projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
af579be
)
fsnotify: replace igrab() with ihold() on attach connector
author
Amir Goldstein
<amir73il@gmail.com>
Tue, 10 Aug 2021 15:12:17 +0000
(18:12 +0300)
committer
Jan Kara
<jack@suse.cz>
Wed, 11 Aug 2021 11:50:28 +0000
(13:50 +0200)
We must have a reference on inode, so ihold is cheaper.
Link:
https://lore.kernel.org/r/20210810151220.285179-2-amir73il@gmail.com
Reviewed-by: Matthew Bobrowski <repnop@google.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/notify/mark.c
patch
|
blob
|
history
diff --git
a/fs/notify/mark.c
b/fs/notify/mark.c
index
d32ab34
..
80459db
100644
(file)
--- a/
fs/notify/mark.c
+++ b/
fs/notify/mark.c
@@
-493,8
+493,11
@@
static int fsnotify_attach_connector_to_object(fsnotify_connp_t *connp,
conn->fsid.val[0] = conn->fsid.val[1] = 0;
conn->flags = 0;
}
- if (conn->type == FSNOTIFY_OBJ_TYPE_INODE)
- inode = igrab(fsnotify_conn_inode(conn));
+ if (conn->type == FSNOTIFY_OBJ_TYPE_INODE) {
+ inode = fsnotify_conn_inode(conn);
+ ihold(inode);
+ }
+
/*
* cmpxchg() provides the barrier so that readers of *connp can see
* only initialized structure