Message ID | 20180912150142.157913-4-arnd@arndb.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | None | expand |
From: Arnd Bergmann > Sent: 12 September 2018 16:01 > > The ceph_ioctl function is used both for files and directories, but only > the files support doing that in 32-bit compat mode. > > For consistency, add the same compat handler to the dir operations > as well. Have you verified that all the relevant ioctl buffer structures are exactly the same for 32bit and 64bit applications? David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)
On Wed, Sep 12, 2018 at 6:10 PM David Laight <David.Laight@aculab.com> wrote: > > From: Arnd Bergmann > > Sent: 12 September 2018 16:01 > > > > The ceph_ioctl function is used both for files and directories, but only > > the files support doing that in 32-bit compat mode. > > > > For consistency, add the same compat handler to the dir operations > > as well. > > Have you verified that all the relevant ioctl buffer structures are > exactly the same for 32bit and 64bit applications? I checked it now, it's fine: there are only ceph_ioctl_dataloc and ceph_ioctl_layout structures passed here, both of which are compatible. I assumed that the ceph_dir_fops operations were correct here (they are), but you are right that I should have double checked for more bugs as I encountered one of them. Arnd
On Wed, Sep 12, 2018 at 11:10 PM Arnd Bergmann <arnd@arndb.de> wrote: > > The ceph_ioctl function is used both for files and directories, but only > the files support doing that in 32-bit compat mode. > > For consistency, add the same compat handler to the dir operations > as well. > > Cc: stable@vger.kernel.org > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > --- > fs/ceph/dir.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c > index 82928cea0209..da73f29d7faa 100644 > --- a/fs/ceph/dir.c > +++ b/fs/ceph/dir.c > @@ -1489,6 +1489,7 @@ const struct file_operations ceph_dir_fops = { > .open = ceph_open, > .release = ceph_release, > .unlocked_ioctl = ceph_ioctl, > + .compat_ioctl = ceph_ioctl, > .fsync = ceph_fsync, > .lock = ceph_lock, > .flock = ceph_flock, > -- > 2.18.0 > Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 82928cea0209..da73f29d7faa 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c @@ -1489,6 +1489,7 @@ const struct file_operations ceph_dir_fops = { .open = ceph_open, .release = ceph_release, .unlocked_ioctl = ceph_ioctl, + .compat_ioctl = ceph_ioctl, .fsync = ceph_fsync, .lock = ceph_lock, .flock = ceph_flock,
The ceph_ioctl function is used both for files and directories, but only the files support doing that in 32-bit compat mode. For consistency, add the same compat handler to the dir operations as well. Cc: stable@vger.kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- fs/ceph/dir.c | 1 + 1 file changed, 1 insertion(+)