---
name: "sb_start_pagefault"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/sb_start_pagefault"
---

# sb\_start\_pagefault(9)

get write access to a superblock from a page fault

## NAME

sb\_start\_pagefault - get write access to a superblock from a page fault

## SYNOPSIS

**void sb\_start\_pagefault(struct super\_block \*** *sb***);**

## ARGUMENTS

*sb*

the super we write to

## DESCRIPTION

When a process starts handling write page fault, it should embed the operation into **sb\_start\_pagefault** - **sb\_end\_pagefault** pair to get exclusion against file system freezing. This is needed since the page fault is going to dirty a page. This function increments number of running page faults preventing freezing. If the file system is already frozen, the function waits until the file system is thawed.

Since page fault freeze protection behaves as a lock, users have to preserve ordering of freeze protection and other filesystem locks. It is advised to put **sb\_start\_pagefault** close to mmap\_sem in lock ordering. Page fault handling code implies lock dependency:

mmap\_sem -\> sb\_start\_pagefault

## COPYRIGHT
