fdinfo.c (4f2c0a4acffbec01079c28f839422e64ddeff004) fdinfo.c (304e9c83e80d5cbe20ab64ffa1fac9fc51d30bc9)
1// SPDX-License-Identifier: GPL-2.0
2#include <linux/file.h>
3#include <linux/fs.h>
4#include <linux/fsnotify_backend.h>
5#include <linux/idr.h>
6#include <linux/init.h>
7#include <linux/inotify.h>
8#include <linux/fanotify.h>

--- 36 unchanged lines hidden (view full) ---

45 struct file_handle handle;
46 u8 pad[MAX_HANDLE_SZ];
47 } f;
48 int size, ret, i;
49
50 f.handle.handle_bytes = sizeof(f.pad);
51 size = f.handle.handle_bytes >> 2;
52
1// SPDX-License-Identifier: GPL-2.0
2#include <linux/file.h>
3#include <linux/fs.h>
4#include <linux/fsnotify_backend.h>
5#include <linux/idr.h>
6#include <linux/init.h>
7#include <linux/inotify.h>
8#include <linux/fanotify.h>

--- 36 unchanged lines hidden (view full) ---

45 struct file_handle handle;
46 u8 pad[MAX_HANDLE_SZ];
47 } f;
48 int size, ret, i;
49
50 f.handle.handle_bytes = sizeof(f.pad);
51 size = f.handle.handle_bytes >> 2;
52
53 ret = exportfs_encode_inode_fh(inode, (struct fid *)f.handle.f_handle, &size, NULL);
53 ret = exportfs_encode_fid(inode, (struct fid *)f.handle.f_handle, &size);
54 if ((ret == FILEID_INVALID) || (ret < 0)) {
55 WARN_ONCE(1, "Can't encode file handler for inotify: %d\n", ret);
56 return;
57 }
58
59 f.handle.handle_type = ret;
60 f.handle.handle_bytes = size * sizeof(u32);
61

--- 87 unchanged lines hidden ---
54 if ((ret == FILEID_INVALID) || (ret < 0)) {
55 WARN_ONCE(1, "Can't encode file handler for inotify: %d\n", ret);
56 return;
57 }
58
59 f.handle.handle_type = ret;
60 f.handle.handle_bytes = size * sizeof(u32);
61

--- 87 unchanged lines hidden ---