fsnotify/fdinfo: exportfs_encode_inode_fh() takes pointer as 4th argument
Subsystems (2)
PATCH 1/1 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
---
Cc: Jan Kara <[email protected]>
Cc: Amir Goldstein <[email protected]>
Cc: [email protected]
Cc: [email protected]
--- fs/notify/fdinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/notify/fdinfo.c +1 -1
@@ -50,7 +50,7 @@ static void show_mark_fhandle(struct seq_file *m, struct inode *inode) f.handle.handle_bytes =sizeof (f.pad); size = f.handle.handle_bytes >>2 ; - ret =exportfs_encode_inode_fh (inode, (struct fid *)f.handle.f_handle, &size,0 ); + ret =exportfs_encode_inode_fh (inode, (struct fid *)f.handle.f_handle, &size,NULL );if ((ret ==FILEID_INVALID ) || (ret <0 )) {WARN_ONCE (1 ,"Can't encode file handler for inotify: %d\n" , ret);return ;
Signature · 1 line
2.23.0
Jan Kara
maintainerQuoted 9 lines · Ben Dooks (Codethink)
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 pointerSigned-off-by Ben Dooks <[email protected]>
Thanks for the cleanup! Applied.
Honza
Quoted 25 lines
---
Cc: Jan Kara <[email protected]>
Cc: Amir Goldstein <[email protected]>
Cc: [email protected]
Cc: [email protected]--- fs/notify/fdinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/notify/fdinfo.c +1
-1@@ -50,7 +50,7 @@ static void show_mark_fhandle(struct seq_file *m, struct inode *inode) f.handle.handle_bytes =sizeof (f.pad); size = f.handle.handle_bytes >>2 ; - ret =exportfs_encode_inode_fh (inode, (struct fid *)f.handle.f_handle, &size,0 ); + ret =exportfs_encode_inode_fh (inode, (struct fid *)f.handle.f_handle, &size,NULL );if ((ret ==FILEID_INVALID ) || (ret <0 )) {WARN_ONCE (1 ,"Can't encode file handler for inotify: %d\n" , ret);return ;Signature · 1 line
2.23.0
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR