mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
fs/pipe.c: add ->statfs callback for pipefs
Currently a statfs on a pipe's /proc/<pid>/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 <[email protected]> Reviewed-by: Tejun Heo <[email protected]> Acked-by: Serge Hallyn <[email protected]> Signed-off-by: Cyrill Gorcunov <[email protected]> Cc: Al Viro <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
a8aff21ecc
commit
d70ef97baf
1 changed files with 1 additions and 0 deletions
|
|
@ -1254,6 +1254,7 @@ out:
|
|||
|
||||
static const struct super_operations pipefs_ops = {
|
||||
.destroy_inode = free_inode_nonrcu,
|
||||
.statfs = simple_statfs,
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue