Skip to contentSkip to conversation

: Fix sparse warning in vfs.c

PATCH New Usha Ketineni 1 participant 1 message May 24, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : Fix sparse warning in vfs.c

Below trivial fix casts __user attribute to avoid sparse warning

fs/nfsd/vfs.c +1 -1
@@ -1383,7 +1383,7 @@ nfsd_readlink(struct svc_rqst *rqstp, st
 	 */
 
 	oldfs = get_fs(); set_fs(KERNEL_DS);
-	err = inode->i_op->readlink(dentry, buf, *lenp);
+	err = inode->i_op->readlink(dentry, (char __user *)buf, *lenp);
 	set_fs(oldfs);
 
 	if (err < 0)