OSDN Git Service

ANDROID: sdcardfs: Added top to sdcardfs_inode_info
authorDaniel Rosenberg <drosen@google.com>
Wed, 18 May 2016 23:57:10 +0000 (16:57 -0700)
committerAmit Pundir <amit.pundir@linaro.org>
Tue, 14 Aug 2018 12:17:11 +0000 (17:47 +0530)
commit0345c37817273e3bc4974469f2f1415544df7004
treeaac4db82bee1776c23f2dd5c988851a73944e643
parent33cabfb8a14b51eeeb713c45a722a077777eb023
ANDROID: sdcardfs: Added top to sdcardfs_inode_info

Adding packages to the package list and moving files
takes a large amount of locks, and is currently a
heavy operation. This adds a 'top' field to the
inode_info, which points to the inode for the top
most directory whose owner you would like to match.

On permission checks and get_attr, we look up the
owner based on the information at top. When we change
a package mapping, we need only modify the information
in the corresponding top inode_info's. When renaming,
we must ensure top is set correctly in all children.
This happens when an app specific folder gets moved
outside of the folder for that app.

Change-Id: Ib749c60b568e9a45a46f8ceed985c1338246ec6c
Signed-off-by: Daniel Rosenberg <drosen@google.com>
fs/sdcardfs/derived_perm.c
fs/sdcardfs/inode.c
fs/sdcardfs/main.c
fs/sdcardfs/packagelist.c
fs/sdcardfs/sdcardfs.h
fs/sdcardfs/super.c