]> git.baikalelectronics.ru Git - kernel.git/commit
uml: make hostfs_setattr() support operations on unlinked open files
authorAlberto Bertogli <albertito@gmail.com>
Tue, 8 May 2007 07:23:16 +0000 (00:23 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 8 May 2007 18:14:57 +0000 (11:14 -0700)
commitbb9b18a0fc434ef60d7808e33909018ec9b9009b
tree4de7b322cfd25794a79cb46b0feab1113785f7a8
parent061df8be57bc11cc1eebef2994e3e75585594543
uml: make hostfs_setattr() support operations on unlinked open files

This patch allows hostfs_setattr() to work on unlinked open files by calling
set_attr() (the userspace part) with the inode's fd.

Without this, applications that depend on doing attribute changes to unlinked
open files will fail.

It works by using the fd versions instead of the path ones (for example
fchmod() instead of chmod(), fchown() instead of chown()) when an fd is
available.

Signed-off-by: Alberto Bertogli <albertito@gmail.com>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/hostfs/hostfs.h
fs/hostfs/hostfs_kern.c
fs/hostfs/hostfs_user.c