nicupavel / emlog

emlog -- the EMbedded-system LOG-device
GNU General Public License v2.0
56 stars 20 forks source link

Fix access to the dentry #3

Closed tpetazzoni closed 8 years ago

tpetazzoni commented 8 years ago

Since Linux 2.6.20, the dentry pointer is no longer stored in file->f_dentry, but in file->f_path.dentry. Until Linux 3.19, there was a compatibility macro which made the change transparent, but this macro has now been removed.

Since we probably don't care about compatibility with kernels older than 2.6.20, this commit takes the simple approach of using file->f_path.dentry. This will work with any kernel >= 2.6.20.

Signed-off-by: Thomas Petazzoni thomas.petazzoni@free-electrons.com

nicupavel commented 8 years ago

Merged. Thanks.