From: Pavel Emelyanov Date: Tue, 1 Nov 2011 00:10:04 +0000 (-0700) Subject: fs/pipe.c: add ->statfs callback for pipefs X-Git-Tag: v3.2-rc1~108^2~56 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d70ef97baf048412c395bb5d65791d8fe133a52b;p=pandora-kernel.git fs/pipe.c: add ->statfs callback for pipefs Currently a statfs on a pipe's /proc//fd/ link returns -ENOSYS. Wire pipfs up so that the statfs succeeds. This is required by checkpoint-restart in the userspace to make it possible to distinguish pipes from fifos. When we dump information about task's open files we use the /proc/pid/fd directoy's symlinks and the fact that opening any of them gives us exactly the same dentry->inode pair as the original process has. Now if a task we're dumping has opened pipe and fifo we need to detect this and act accordingly. Knowing that an fd with type S_ISFIFO resides on a pipefs is the most precise way. Signed-off-by: Pavel Emelyanov Reviewed-by: Tejun Heo Acked-by: Serge Hallyn Signed-off-by: Cyrill Gorcunov Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed