File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,8 @@ nullfs_mount(struct mount *mp)
8585 char * target ;
8686 int error , len ;
8787 bool isvnunlocked ;
88+ static const char cache_opt_name [] = "cache" ;
89+ static const char nocache_opt_name [] = "nocache" ;
8890
8991 NULLFSDEBUG ("nullfs_mount(mp = %p)\n" , (void * )mp );
9092
@@ -205,9 +207,10 @@ nullfs_mount(struct mount *mp)
205207 MNT_IUNLOCK (mp );
206208 }
207209
208- if (vfs_getopt (mp -> mnt_optnew , "cache" , NULL , NULL ) == 0 ) {
210+ if (vfs_getopt (mp -> mnt_optnew , cache_opt_name , NULL , NULL ) == 0 ) {
209211 xmp -> nullm_flags |= NULLM_CACHE ;
210- } else if (vfs_getopt (mp -> mnt_optnew , "nocache" , NULL , NULL ) == 0 ) {
212+ } else if (vfs_getopt (mp -> mnt_optnew , nocache_opt_name , NULL ,
213+ NULL ) == 0 ) {
211214 ;
212215 } else if (null_cache_vnodes &&
213216 (xmp -> nullm_vfs -> mnt_kern_flag & MNTK_NULL_NOCACHE ) == 0 ) {
You can’t perform that action at this time.
0 commit comments