Jan Engelhardt
2007-Sep-14 00:28 UTC
[Btrfs-devel] Re: [PATCH 1/1] Fix incompatible pointer
On Sep 14 2007 09:27, Jan Engelhardt wrote:> >/usr/src/packages/BUILD/btrfs-0.8/obj-desktop/file.c: >In function 'btrfs_file_write': >/usr/src/packages/BUILD/btrfs-0.8/obj-desktop/file.c:586: >warning: passing argument 1 of 'remove_suid' from incompatible pointer type > LD [M] /usr/src/packages/BUILD/btrfs-0.8/obj-desktop/btrfs.o>- err = remove_suid(file->f_path.dentry); >+ err = remove_suid(&file->f_path);For 2.6.22 that is... Jan --
/usr/src/packages/BUILD/btrfs-0.8/obj-desktop/file.c: In function 'btrfs_file_write': /usr/src/packages/BUILD/btrfs-0.8/obj-desktop/file.c:586: warning: passing argument 1 of 'remove_suid' from incompatible pointer type LD [M] /usr/src/packages/BUILD/btrfs-0.8/obj-desktop/btrfs.o --- file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: btrfs-0.8/file.c ==================================================================--- btrfs-0.8.orig/file.c +++ btrfs-0.8/file.c @@ -583,7 +583,7 @@ static ssize_t btrfs_file_write(struct f goto out; if (count == 0) goto out; - err = remove_suid(file->f_path.dentry); + err = remove_suid(&file->f_path); if (err) goto out; file_update_time(file);
Jan Engelhardt
2007-Sep-14 01:17 UTC
[Btrfs-devel] Re: [PATCH 1/1] Fix incompatible pointer
On Sep 14 2007 16:15, Yan Zheng wrote:>2007/9/14, Jan Engelhardt <jengelh@computergmbh.de>: >> On Sep 14 2007 09:27, Jan Engelhardt wrote: >> > >> >/usr/src/packages/BUILD/btrfs-0.8/obj-desktop/file.c: >> >In function 'btrfs_file_write': >> >/usr/src/packages/BUILD/btrfs-0.8/obj-desktop/file.c:586: >> >warning: passing argument 1 of 'remove_suid' from incompatible pointer type >> > LD [M] /usr/src/packages/BUILD/btrfs-0.8/obj-desktop/btrfs.o >> >> >- err = remove_suid(file->f_path.dentry); >> >+ err = remove_suid(&file->f_path); >> >> For 2.6.22 that is... > >Follow codes fragment is in 2.6.22.5/include/linux/namei.h. I'm afraid >the change is wrong. > >struct path { > struct vfsmount *mnt; > struct dentry *dentry; >};10:15 ichi:../include/linux > grep remove_suid * fs.h:extern int __remove_suid(struct path *, int); fs.h:extern int should_remove_suid(struct dentry *); fs.h:extern int remove_suid(struct path *); This may be due to the apparmor stuff. Jan --