Now that connector is always associated with the superblock, there's no need for the argument. Signed-off-by: Jan Kara --- fs/notify/mark.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/fs/notify/mark.c b/fs/notify/mark.c index 26faa2f640b9..ecd2c3944051 100644 --- a/fs/notify/mark.c +++ b/fs/notify/mark.c @@ -168,9 +168,9 @@ static void fsnotify_put_inode_ref(struct inode *inode) * Grab or drop watched objects reference depending on whether the connector * is attached and has any marks attached. */ -static void fsnotify_update_sb_watchers(struct super_block *sb, - struct fsnotify_mark_connector *conn) +static void fsnotify_update_sb_watchers(struct fsnotify_mark_connector *conn) { + struct super_block *sb = fsnotify_connector_sb(conn); struct fsnotify_sb_info *sbinfo = fsnotify_sb_info(sb); bool is_watched = conn->flags & FSNOTIFY_CONN_FLAG_IS_WATCHED; struct fsnotify_mark *first_mark = NULL; @@ -358,8 +358,7 @@ static void *fsnotify_detach_connector_from_object( /* We make detached connectors point to the superblock */ conn->obj = sb; conn->type = FSNOTIFY_OBJ_TYPE_DETACHED; - if (sb) - fsnotify_update_sb_watchers(sb, conn); + fsnotify_update_sb_watchers(conn); return inode; } @@ -411,11 +410,9 @@ void fsnotify_put_mark(struct fsnotify_mark *mark) objp = fsnotify_detach_connector_from_object(conn, &type); free_conn = true; } else { - struct super_block *sb = fsnotify_connector_sb(conn); - /* Update watched objects after detaching mark */ if (conn->type != FSNOTIFY_OBJ_TYPE_DETACHED) - fsnotify_update_sb_watchers(sb, conn); + fsnotify_update_sb_watchers(conn); objp = __fsnotify_recalc_mask(conn); type = conn->type; } @@ -778,8 +775,7 @@ static int fsnotify_add_mark_list(struct fsnotify_mark *mark, void *obj, /* mark should be the last entry. last is the current last entry */ hlist_add_behind_rcu(&mark->obj_list, &last->obj_list); added: - if (sb) - fsnotify_update_sb_watchers(sb, conn); + fsnotify_update_sb_watchers(conn); /* * Since connector is attached to object using cmpxchg() we are * guaranteed that connector initialization is fully visible by anyone -- 2.51.0