OSDN Git Service

ANDROID: sdcardfs: Propagate dentry down to inode_change_ok()
authorAmit Pundir <amit.pundir@linaro.org>
Tue, 11 Oct 2016 07:56:17 +0000 (13:26 +0530)
committerAmit Pundir <amit.pundir@linaro.org>
Tue, 14 Aug 2018 12:17:11 +0000 (17:47 +0530)
commitde494bfe70495ca11b3220e158ba2a97933caebc
treeba20f63cb1eb8f28784ba1d16d773a206e184986
parent833f515acbe23eaecc400f61e727e5f35e21f0ec
ANDROID: sdcardfs: Propagate dentry down to inode_change_ok()

Since commit 31051c85b5e2 ("fs: Give dentry to inode_change_ok()
instead of inode"), to avoid clearing of capabilities or security
related extended attributes too early, inode_change_ok() will
need to take dentry instead of inode. Propagate it down to
sdcardfs_setattr() and also rename it to setattr_prepare(),
otherwise we run into following build error:

  CC [M]  fs/sdcardfs/inode.o
fs/sdcardfs/inode.c: In function ‘sdcardfs_setattr’:
fs/sdcardfs/inode.c:644:8: error: implicit declaration of function ‘inode_change_ok’ [-Werror=implicit-function-declaration]
  err = inode_change_ok(inode, ia);
        ^

Change-Id: I714b4f4f68b7fea1ac82a71d2f323c76b11fa008
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
fs/sdcardfs/inode.c