]>
Commit | Line | Data |
---|---|---|
9936a6f2 GKH |
1 | From 7e8824816bda16bb11ff5ff1e1212d642e57b0b3 Mon Sep 17 00:00:00 2001 |
2 | From: Andrey Vagin <avagin@openvz.org> | |
3 | Date: Tue, 9 Sep 2014 14:51:06 -0700 | |
4 | Subject: fs/notify: don't show f_handle if exportfs_encode_inode_fh failed | |
5 | ||
6 | From: Andrey Vagin <avagin@openvz.org> | |
7 | ||
8 | commit 7e8824816bda16bb11ff5ff1e1212d642e57b0b3 upstream. | |
9 | ||
10 | Currently we handle only ENOSPC. In case of other errors the file_handle | |
11 | variable isn't filled properly and we will show a part of stack. | |
12 | ||
13 | Signed-off-by: Andrey Vagin <avagin@openvz.org> | |
14 | Acked-by: Cyrill Gorcunov <gorcunov@openvz.org> | |
15 | Cc: Alexander Viro <viro@zeniv.linux.org.uk> | |
16 | Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | |
17 | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | |
18 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
19 | ||
20 | --- | |
21 | fs/notify/fdinfo.c | 2 +- | |
22 | 1 file changed, 1 insertion(+), 1 deletion(-) | |
23 | ||
24 | --- a/fs/notify/fdinfo.c | |
25 | +++ b/fs/notify/fdinfo.c | |
26 | @@ -50,7 +50,7 @@ static int show_mark_fhandle(struct seq_ | |
27 | size = f.handle.handle_bytes >> 2; | |
28 | ||
29 | ret = exportfs_encode_inode_fh(inode, (struct fid *)f.handle.f_handle, &size, 0); | |
30 | - if ((ret == FILEID_INVALID) || (ret == -ENOSPC)) { | |
31 | + if ((ret == FILEID_INVALID) || (ret < 0)) { | |
32 | WARN_ONCE(1, "Can't encode file handler for inotify: %d\n", ret); | |
33 | return 0; | |
34 | } |