Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fsnotify/fdinfo: exportfs_encode_inode_fh() takes pointer as 4th argument

The call to exportfs_encode_inode_fh() takes an pointer
as the 4th argument, so replace the integer 0 with the
NULL pointer.

This fixes the following sparse warning:

fs/notify/fdinfo.c:53:87: warning: Using plain integer as NULL pointer

Link: https://lore.kernel.org/r/20191016095955.3347-1-ben.dooks@codethink.co.uk
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: Jan Kara <jack@suse.cz>

authored by

Ben Dooks (Codethink) and committed by
Jan Kara
ddd06c36 4a0b20be

+1 -1
+1 -1
fs/notify/fdinfo.c
··· 50 50 f.handle.handle_bytes = sizeof(f.pad); 51 51 size = f.handle.handle_bytes >> 2; 52 52 53 - ret = exportfs_encode_inode_fh(inode, (struct fid *)f.handle.f_handle, &size, 0); 53 + ret = exportfs_encode_inode_fh(inode, (struct fid *)f.handle.f_handle, &size, NULL); 54 54 if ((ret == FILEID_INVALID) || (ret < 0)) { 55 55 WARN_ONCE(1, "Can't encode file handler for inotify: %d\n", ret); 56 56 return;