]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
fsnotify: inotify: pass mark connector to fsnotify_recalc_mask()
authorSun Jian <sun.jian.kdev@gmail.com>
Sat, 14 Feb 2026 05:12:17 +0000 (13:12 +0800)
committerJan Kara <jack@suse.cz>
Thu, 26 Feb 2026 14:19:31 +0000 (15:19 +0100)
fsnotify_recalc_mask() expects a plain struct fsnotify_mark_connector *,
but inode->i_fsnotify_marks is an __rcu pointer.  Use fsn_mark->connector
instead to avoid sparse "different address spaces" warnings.

Signed-off-by: Sun Jian <sun.jian.kdev@gmail.com>
Link: https://patch.msgid.link/20260214051217.1381363-1-sun.jian.kdev@gmail.com
Signed-off-by: Jan Kara <jack@suse.cz>
fs/notify/inotify/inotify_user.c

index 2edac3b391787cb12cb35715408830b1e923620b..ed37491c1618974b70f679725c3b3dba95d986a7 100644 (file)
@@ -573,7 +573,7 @@ static int inotify_update_existing_watch(struct fsnotify_group *group,
 
                /* update the inode with this new fsn_mark */
                if (dropped || do_inode)
-                       fsnotify_recalc_mask(inode->i_fsnotify_marks);
+                       fsnotify_recalc_mask(fsn_mark->connector);
 
        }